mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-727
- 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user