WANG 6 년 전
부모
커밋
d9b41c16ec
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/java/cn/com/qmth/examcloud/web/interceptor/StatisticInterceptor.java

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/web/interceptor/StatisticInterceptor.java

@@ -24,9 +24,9 @@ import cn.com.qmth.examcloud.web.support.ApiInfo;
  */
 public class StatisticInterceptor implements HandlerInterceptor {
 
-	private MetricRegistry metrics = new MetricRegistry();
+	private MetricRegistry metricRegistry = new MetricRegistry();
 
-	ConsoleReporter reporter = ConsoleReporter.forRegistry(metrics).convertRatesTo(TimeUnit.SECONDS)
+	ConsoleReporter reporter = ConsoleReporter.forRegistry(metricRegistry).convertRatesTo(TimeUnit.SECONDS)
 			.convertDurationsTo(TimeUnit.MILLISECONDS).build();
 
 	public StatisticInterceptor() {
@@ -44,7 +44,7 @@ public class StatisticInterceptor implements HandlerInterceptor {
 			return true;
 		}
 
-		Timer timer = metrics
+		Timer timer = metricRegistry
 				.timer(MetricRegistry.name(apiInfo.getMapping(), apiInfo.getDescription()));
 		Context ctx = timer.time();
 		request.setAttribute(HttpServletRequestAttribute.$_METRICS_TIMER_CTX.name(), ctx);