@Test public void testDeriveTimerLabel() throws Exception { request.setUri("/myapp", null); Assert.assertTrue("/myapp/".equals(filter.deriveTimerLabel(request))); request.setUri(null, null); Assert.assertTrue("/".equals(filter.deriveTimerLabel(request))); request.setUri("/myapp", "/topics"); Assert.assertTrue("/myapp/topics".equals(filter.deriveTimerLabel(request))); }
protected String deriveTimerLabel(HttpServletRequest request) { StringBuilder builder = new StringBuilder(); if ( StringUtils.isNotBlank(request.getContextPath())) { builder.append(request.getContextPath()); } if ( StringUtils.isNotBlank(request.getPathInfo())) { builder.append(request.getPathInfo()); } if (builder.length() == 0) { return "/"; } return builder.toString().replaceAll(" }
MonetaPerformanceFilter implements Filter { protected String deriveTimerLabel(HttpServletRequest request) { StringBuilder builder = new StringBuilder(); if ( StringUtils.isNotBlank(request.getContextPath())) { builder.append(request.getContextPath()); } if ( StringUtils.isNotBlank(request.getPathInfo())) { builder.append(request.getPathInfo()); } if (builder.length() == 0) { return "/"; } return builder.toString().replaceAll(" } }
MonetaPerformanceFilter implements Filter { protected String deriveTimerLabel(HttpServletRequest request) { StringBuilder builder = new StringBuilder(); if ( StringUtils.isNotBlank(request.getContextPath())) { builder.append(request.getContextPath()); } if ( StringUtils.isNotBlank(request.getPathInfo())) { builder.append(request.getPathInfo()); } if (builder.length() == 0) { return "/"; } return builder.toString().replaceAll(" }  }
MonetaPerformanceFilter implements Filter { protected String deriveTimerLabel(HttpServletRequest request) { StringBuilder builder = new StringBuilder(); if ( StringUtils.isNotBlank(request.getContextPath())) { builder.append(request.getContextPath()); } if ( StringUtils.isNotBlank(request.getPathInfo())) { builder.append(request.getPathInfo()); } if (builder.length() == 0) { return "/"; } return builder.toString().replaceAll(" }  void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain); void destroy(); void init(FilterConfig filterConfig); }
MonetaPerformanceFilter implements Filter { protected String deriveTimerLabel(HttpServletRequest request) { StringBuilder builder = new StringBuilder(); if ( StringUtils.isNotBlank(request.getContextPath())) { builder.append(request.getContextPath()); } if ( StringUtils.isNotBlank(request.getPathInfo())) { builder.append(request.getPathInfo()); } if (builder.length() == 0) { return "/"; } return builder.toString().replaceAll(" }  void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain); void destroy(); void init(FilterConfig filterConfig); static final String PARM_MAX_TRNASACTION_TIME_THRESHOLD_IN_MILLIS; }