Profiling with Cocoon 2.1[[#1]]

Additional information is available in the Profiler userdocs.

Step 1
make sure you use a current Cocoon 2.1 (CVS or nightly build)

Step 2
uncomment <profiler/> (cocoon.xconf)

Step 3
add the necessary pipeline components (sitemap.xmap) (See #2 if you are running an old release.)

     <map:pipes default="caching">
        <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
        <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
        <map:pipe name="profile-caching" src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
        <map:pipe name="profile-noncaching" src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>

Step 4
set the right type at the pipeline you want to watch (sitemap.xmap)

Step 5

<map:generator name="profiler"

Step 6
sitemap.xmap (add a pipeline using the ProfilerGenerator)

  <map:match pattern="profiler">
        <map:generate type="profiler"/>
        <map:serialize type="xml"/>

Step 6
call http://<your-servlet-container>:<your-port>/<path-to-profiler>/profiler

: Profiling is also possible with Cocoon 2.0.3 (and earlier?). However the setup procedure is not quite the same: see the Profile Generator docs for more info.

: Before version 2.1.2 these elements seem to be map:pipelines and map:pipeline (instead of map:pipes and map:pipe)

Profiling (last edited 2009-09-20 23:40:30 by localhost)