Package org.apache.cocoon.profiling.statistics

Examples of org.apache.cocoon.profiling.statistics.PageReport


                XMLUtils.startElement(this.xmlConsumer, "pages");
                entries = new ArrayList(this.collector.getPageReports());
                Collections.sort(entries, new PageReportComparator());
                final Iterator pi = entries.iterator();
                while ( pi.hasNext() ) {
                    final PageReport report = (PageReport)pi.next();
                    final AttributesImpl attrs = new AttributesImpl();
                    attrs.addCDATAAttribute("id", report.getId());
                    attrs.addCDATAAttribute("date", report.getDate().toString());
                    XMLUtils.startElement(this.xmlConsumer, "report", attrs);
                    final Iterator si = report.getStatistics().iterator();
                    while ( si.hasNext() ) {
                        final Statistics stats = (Statistics)si.next();
                        attrs.clear();
                        attrs.addCDATAAttribute("name", stats.getCategory());
                        attrs.addCDATAAttribute("duraration", String.valueOf(stats.getDuration()));
View Full Code Here


    }

    public static final class PageReportComparator implements Comparator {

        public int compare(Object o1, Object o2) {
            PageReport r1 = (PageReport)o1;
            PageReport r2 = (PageReport)o2;
            return r1.getId().compareTo(r2.getId());
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.profiling.statistics.PageReport

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.