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);