WANG 5 년 전
부모
커밋
57c6214c70
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

+ 9 - 0
src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

@@ -124,6 +124,10 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 		}
 		}
 		expression = expression.trim();
 		expression = expression.trim();
 
 
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("expression=" + expression + " ; mapping=" + apiInfo.getMapping());
+		}
+
 		Map<String, Object> env = Maps.newHashMap();
 		Map<String, Object> env = Maps.newHashMap();
 		env.put("mean", apiStatusInfo.getMean());
 		env.put("mean", apiStatusInfo.getMean());
 		env.put("max", apiStatusInfo.getMax());
 		env.put("max", apiStatusInfo.getMax());
@@ -155,6 +159,11 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 					LOG.error("error value. key= " + key, e);
 					LOG.error("error value. key= " + key, e);
 				}
 				}
 
 
+				if (LOG.isDebugEnabled()) {
+					LOG.debug(
+							"minCallRate=" + curMinCallRate + "; mapping=" + apiInfo.getMapping());
+				}
+
 				if (oneMinuteRate < curMinCallRate) {
 				if (oneMinuteRate < curMinCallRate) {
 					return true;
 					return true;
 				}
 				}