WANG 6 năm trước cách đây
mục cha
commit
d9b41c16ec

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