Package net.sourceforge.processdash.log.time

Examples of net.sourceforge.processdash.log.time.TimeLogEntry


    private void saveActualPreTime(TimeLog log) throws IOException {
        try {
            Iterator entries = log.filter(null, null, scheduleStartDate);
            while (entries.hasNext()) {
                TimeLogEntry entry = (TimeLogEntry) entries.next();
               
                Date d = entry.getStartTime();
                if (d == null || d.compareTo(scheduleStartDate) >= 0) continue;
   
                EVTask task = taskRoot.getTaskForPath(entry.getPath());
                if (task != null && !task.isLevelOfEffortTask())
                    task.actualPreTime += entry.getElapsedTime();
            }
        } catch (IONoSuchElementException ion) {
            throw ion.getIOException();
        }
    }
View Full Code Here


            this.filter = filter;
            init();
        }

        protected boolean includeInResults(Object o) {
            TimeLogEntry entry = (TimeLogEntry) o;
            String path = entry.getPath();
            return Filter.matchesFilter(filter, path);
        }
View Full Code Here

            super(timeLogEntries, pathRemapper);
        }

        @Override
        public Object next() {
            TimeLogEntry tle = (TimeLogEntry) super.next();
            maxDate = DateUtils.maxDate(maxDate, tle.getStartTime());
            return tle;
        }
View Full Code Here

        out.print(header);

        ProcessUtil procUtil = new ProcessUtil(getDataContext());

        for (Iterator rows = l.iterator(); rows.hasNext();) {
            TimeLogEntry tle = (TimeLogEntry) rows.next();
            String entryPath = tle.getPath();
            String phase = procUtil.getEffectivePhase(entryPath, false);
            if (phase == null) {
                int slashPos = entryPath.lastIndexOf('/');
                phase = entryPath.substring(slashPos+1);
                entryPath = entryPath.substring(0, slashPos);
            }

            out.println("<TR>");
            out.println("<TD NOWRAP>" + HTMLUtils.escapeEntities(entryPath)
                    + "</TD>");
            out.println("<TD>" + HTMLUtils.escapeEntities(phase) + "</TD>");
            out.println("<TD>" +
                        FormatUtil.formatDateTime(tle.getStartTime()) +
                        "</TD>");
            out.println("<TD>" + tle.getElapsedTime() + "</TD>");
            out.println("<TD>" + tle.getInterruptTime() + "</TD>");
            String comment = tle.getComment();
            out.println("<TD>" + (comment == null ? ""
                    : HTMLUtils.escapeEntities(comment)) + "</TD>");
            out.println("</TR>");
        }
        out.println("</TABLE><!-- cutEnd -->");
View Full Code Here

                    dayNames[i] = dayFormat.format(cal.getTime());
                }

            try {
                Iterator e = timeLog.filter(null, from, to);
                TimeLogEntry tle;
                time = new double[32];
                int day;
                while (e.hasNext()) {
                    tle = (TimeLogEntry) e.next();
                    cal.setTime(tle.getStartTime());
                    day = cal.get(Calendar.DAY_OF_MONTH);
   
                    root.addTime(tle.getPath(), day, tle.getElapsedTime());
                    time[0] += tle.getElapsedTime();
                    time[day] += tle.getElapsedTime();
                }
            } catch (IONoSuchElementException ionsee) {
                showError(ionsee);
            } catch (IOException ioe) {
                showError(ioe);
View Full Code Here

    private SortedMap getTimes(Date fd, Date td) {
        SortedMap result = new TreeMap();
        try {
            for (Iterator i = timeLog.filter(null, fd, td); i.hasNext();) {
                TimeLogEntry tle = (TimeLogEntry) i.next();
                String path = tle.getPath();
                long[] t = (long[]) result.get(path);
                if (t == null) {
                    t = new long[] { 0L };
                    result.put(path, t);
                }
                t[0] += tle.getElapsedTime();
            }
        } catch (Exception e) {
        }
        return result;
    }
View Full Code Here

                    DataRepository.DUMP_STYLE_TEXT);

            TimeLog tl = ctx.getTimeLog();
            Iterator keys = tl.filter(null, null, null);
            while (keys.hasNext()) {
                TimeLogEntry tle = (TimeLogEntry) keys.next();
                if (Filter.matchesFilter(filter, tle.getPath()))
                    out.println(toAbbrevString(tle));
            }

            out.println(DefectXmlConstantsv1.DEFECT_START_TOKEN);
            DefectExporterXMLv1 exp = new DefectExporterXMLv1();
View Full Code Here

    private void addTimeLogEntries(ProcessUtil process,
            Map<String, PhaseSeries> phases, List timeLogEntries,
            GapSkipTracker gaps, ExceptionSeries exceptions) {
        for (Iterator i = timeLogEntries.iterator(); i.hasNext();) {
            TimeLogEntry tle = (TimeLogEntry) i.next();
            addTimeLogEntry(process, phases, tle, gaps, exceptions);
        }
    }
View Full Code Here

        Map<String, Double> actualTimes = new HashMap();
        try {
            EnumerIterator timeLogEntries = getDashboardContext().getTimeLog()
                    .filter(null, fromDate, toDate);
            while (timeLogEntries.hasNext()) {
                TimeLogEntry tle = (TimeLogEntry) timeLogEntries.next();
                String path = tle.getPath();
                double time = tle.getElapsedTime();
                sumActualTime(actualTimes, path, time);
            }
        } catch (IOException e) {
        }
        result.put(getOwner(), actualTimes);
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.log.time.TimeLogEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.