Merge pull request #336 from wenshao/master

request for bulk integrate
This commit is contained in:
温高铁
2013-05-10 22:47:02 -07:00
21 changed files with 574 additions and 68 deletions
@@ -191,9 +191,11 @@ public class WebStatFilter implements Filter {
if (isProfileEnable()) {
Profiler.release(nanos);
Map<ProfileEntryKey, ProfileEntryReqStat> requestStatsMap = Profiler.getStatsMap();
uriStat.getProfiletat().record(requestStatsMap);
if (uriStat != null) {
uriStat.getProfiletat().record(requestStatsMap);
}
Profiler.removeLocal();
}
}
@@ -380,8 +382,9 @@ public class WebStatFilter implements Filter {
StatFilterContext.getInstance().addContextListener(statFilterContextListener);
this.contextPath = DruidWebUtils.getContextPath(config.getServletContext());
webAppStat = new WebAppStat(contextPath, this.sessionStatMaxCount);
if (webAppStat == null) {
webAppStat = new WebAppStat(contextPath, this.sessionStatMaxCount);
}
WebAppStatManager.getInstance().addWebAppStatSet(webAppStat);
}
@@ -410,6 +413,10 @@ public class WebStatFilter implements Filter {
this.profileEnable = profileEnable;
}
public void setWebAppStat(WebAppStat webAppStat) {
this.webAppStat = webAppStat;
}
public WebAppStat getWebAppStat() {
return webAppStat;
}