Author: crossley
Date: Sun Sep 11 23:25:55 2005
New Revision: 280269
URL: http://svn.apache.org/viewcvs?rev=280269&view=rev
Log:
Move the profiler to front of sitemap, so that it be invoked for
projects and for plugins testing, and can also provide the raw xml data.
Change the pattern from "profile.*" to "cprofile.*".
Modified:
forrest/trunk/main/webapp/profiler.xmap
forrest/trunk/main/webapp/resources/stylesheets/profile2html.xsl
forrest/trunk/main/webapp/sitemap.xmap
Modified: forrest/trunk/main/webapp/profiler.xmap
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/profiler.xmap?rev=280269&r1=280268&r2=280269&view=diff
==============================================================================
--- forrest/trunk/main/webapp/profiler.xmap (original)
+++ forrest/trunk/main/webapp/profiler.xmap Sun Sep 11 23:25:55 2005
@@ -21,9 +21,10 @@
To enable this, edit sitemap.xmap and switch to use the "profiling pipes"
as described. Do 'forrest run' then do a few requests of the pipeline that
you want to profile (e.g. localhost:8888/index.html) then look at
-the profiler http://localhost:8888/profile.html
+the profiler http://localhost:8888/cprofile.html
-See more notes at http://cocoon.apache.org/2.1/userdocs/concepts/profiler.html
+See more notes at
+http://cocoon.apache.org/2.1/userdocs/concepts/profiler.html
Used by : Forrest hackers desperate for speed
Uses : Stats collected by the profile-caching pipeline.
@@ -44,7 +45,7 @@
<map:pipelines>
<map:pipeline>
- <map:match pattern="profile.html">
+ <map:match pattern="cprofile.html">
<map:generate type="profiler"/>
<map:transform src="{forrest:stylesheets}/profile2html.xsl">
<map:parameter name="use-request-parameters" value="true"/>
@@ -52,7 +53,7 @@
<map:serialize type="html"/>
</map:match>
- <map:match pattern="profile.xml">
+ <map:match pattern="cprofile.xml">
<map:generate type="profiler"/>
<map:serialize type="xml"/>
</map:match>
Modified: forrest/trunk/main/webapp/resources/stylesheets/profile2html.xsl
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/profile2html.xsl?rev=280269&r1=280268&r2=280269&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/profile2html.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/profile2html.xsl Sun Sep 11
23:25:55 2005
@@ -215,9 +215,12 @@
<td>
<xsl:if test="position() != last()">
- <a href="profile.xml?key={$key}&result={$result}&[EMAIL
PROTECTED]&fragmentonly=true">[XML]</a>
+ <!-- FIXME: hard-coded filename -->
+ <a href="cprofile.xml?key={$key}&result={$result}&[EMAIL
PROTECTED]&fragmentonly=true">[XML]</a>
+<!-- Forrest doesn't enable this cocoon-view
  
<a href="profile.xml?key={$key}&result={$result}&[EMAIL
PROTECTED]&fragmentonly=true&cocoon-view=pretty-content">[XML as
HTML]</a>
+-->
</xsl:if>
</td>
</tr>
Modified: forrest/trunk/main/webapp/sitemap.xmap
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=280269&r1=280268&r2=280269&view=diff
==============================================================================
--- forrest/trunk/main/webapp/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/sitemap.xmap Sun Sep 11 23:25:55 2005
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2002-2004 The Apache Software Foundation or its licensors,
+ Copyright 2002-2005 The Apache Software Foundation or its licensors,
as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -225,8 +225,11 @@
<map:pipe name="noncaching"
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
<!-- profiling pipes -->
- <!-- See FOR-572 and when you want to do profiling, then
- replace the standards pipes above -->
+ <!-- When you want to do profiling, then replace the
+ standard map:pipes above.
+ See docs/howto/howto-dev.html#debug-cocoon-profiler
+ See FOR-572
+ -->
<!--
<map:pipe name="caching"
src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
<map:pipe name="noncaching"
src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>
@@ -297,6 +300,12 @@
<!-- =========================== Pipelines =================================
-->
<map:pipelines>
+ <!-- Cocoon sitemap profiler -->
+ <map:pipeline internal-only="false">
+ <map:match pattern="cprofile.*">
+ <map:mount uri-prefix="" src="profiler.xmap" check-reload="yes" />
+ </map:match>
+ </map:pipeline>
<map:pipeline type="caching" internal-only="true">
@@ -557,9 +566,6 @@
</map:pipeline>
<map:pipeline internal-only="false">
- <map:match pattern="profile.html">
- <map:mount uri-prefix="" src="profiler.xmap" check-reload="yes" />
- </map:match>
<!--pipeline that "marries" the docs in the root dir with the skin to produce
html-->
<map:match pattern="*.html">