- added profiling to FreeMarkerPageFilter



git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@454721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Toby Jee
2006-10-10 12:33:25 +00:00
parent 91b7b0fcdf
commit 8fa51a5cae
@@ -35,6 +35,7 @@ import com.opensymphony.module.sitemesh.Page;
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 @@ public class FreeMarkerPageFilter extends TemplatePageFilter {
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
@@ -144,6 +149,9 @@ public class FreeMarkerPageFilter extends TemplatePageFilter {
LOG.error(msg, e);
throw new ServletException(msg, e);
}
finally {
UtilTimerStack.pop(timerKey);
}
}
/**