Author: tmjee
Date: Tue Oct 10 05:33:25 2006
New Revision: 454721
URL: http://svn.apache.org/viewvc?view=rev&rev=454721
Log:
WW-727
- added profiling to FreeMarkerPageFilter
Modified:
struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
Modified:
struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java?view=diff&rev=454721&r1=454720&r2=454721
==============================================================================
---
struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
(original)
+++
struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
Tue Oct 10 05:33:25 2006
@@ -35,6 +35,7 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.LocaleProvider;
+import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
import freemarker.template.Configuration;
import freemarker.template.SimpleHash;
@@ -117,7 +118,11 @@
HttpServletRequest req, HttpServletResponse
res,
ServletContext servletContext, ActionContext
ctx)
throws ServletException, IOException {
+
+ String timerKey = "FreemarkerPageFilter_applyDecorator: ";
try {
+ UtilTimerStack.push(timerKey);
+
FreemarkerManager fmm = FreemarkerManager.getInstance();
// get the configuration and template
@@ -143,6 +148,9 @@
String msg = "Error applying decorator: " + e.getMessage();
LOG.error(msg, e);
throw new ServletException(msg, e);
+ }
+ finally {
+ UtilTimerStack.pop(timerKey);
}
}