cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27875] - Profiling data not saved with internal pipelines
Date Tue, 23 Mar 2004 18:21:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27875>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27875

Profiling data not saved with internal pipelines





------- Additional Comments From fechner@werum.com  2004-03-23 18:21 -------
Hello Stephan,
I've added the following methods to the ProfilingNonCachingProcessingPipeline
and the ProfilingCachingProcessingPipeline classes (Testing was only done using
the noncaching class):

<snippet>

    /**
     * Process the SAX event pipeline
     */
    protected boolean processXMLPipeline(Environment environment)
    throws ProcessingException {
        this.index = 0;
        if (this.data!=null) {
            // Capture environment info
            this.data.setEnvironmentInfo(new EnvironmentInfo(environment));

            // Execute pipeline
            long time = System.currentTimeMillis();
            boolean result = super.processXMLPipeline(environment);

            this.data.setTotalTime(System.currentTimeMillis()-time);

            // Report
            profiler.addResult(environment.getURI(), this.data);
            return result;
        } else {
            getLogger().warn("Profiler Data havn't any components to measure");
            return super.processXMLPipeline(environment);
        }
    }    
    
    /**
     * Process the pipeline using a reader.
     * @throws ProcessingException if
     */
    protected boolean processReader(Environment environment)
    throws ProcessingException {
        this.index = 0;
         if (this.data!=null) {
             // Capture environment info
             this.data.setEnvironmentInfo(new EnvironmentInfo(environment));

             // Execute pipeline
             long time = System.currentTimeMillis();
             boolean result = super.processReader(environment);

             this.data.setTotalTime(System.currentTimeMillis()-time);

             // Report
             profiler.addResult(environment.getURI(), this.data);
             return result;
         } else {
             getLogger().warn("Profiler Data havn't any components to measure");
             return super.processReader(environment);
         }        
    }
   
</snippet>

Mime
View raw message