SunnyBoy-WYH commented on code in PR #2327:
URL:
https://github.com/apache/incubator-hugegraph/pull/2327#discussion_r1368863374
##########
hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java:
##########
@@ -62,13 +79,24 @@ public void filter(ContainerRequestContext requestContext,
ContainerResponseCont
// get responseTime
Object requestTime = requestContext.getProperty(REQUEST_TIME);
- if(requestTime!=null){
+ if(requestTime != null){
long now = System.currentTimeMillis();
- long responseTime = (now - (long)requestTime);
+ long start = (Long) requestTime;
+ long responseTime = now - start;
MetricsUtil.registerHistogram(
join(metricsName,
METRICS_PATH_RESPONSE_TIME_HISTOGRAM))
.update(responseTime);
+
+ HugeConfig config = configProvider.get();
+ Long timeThreshold =
config.get(ServerOptions.SLOW_QUERY_LOG_TIME_THRESHOLD);
Review Comment:
thanks , but i dont know “Holding the timeThreshold in a private variable ”
means what? thanks again
##########
hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java:
##########
@@ -62,13 +79,24 @@ public void filter(ContainerRequestContext requestContext,
ContainerResponseCont
// get responseTime
Object requestTime = requestContext.getProperty(REQUEST_TIME);
- if(requestTime!=null){
+ if(requestTime != null){
long now = System.currentTimeMillis();
- long responseTime = (now - (long)requestTime);
+ long start = (Long) requestTime;
+ long responseTime = now - start;
MetricsUtil.registerHistogram(
join(metricsName,
METRICS_PATH_RESPONSE_TIME_HISTOGRAM))
.update(responseTime);
+
+ HugeConfig config = configProvider.get();
+ Long timeThreshold =
config.get(ServerOptions.SLOW_QUERY_LOG_TIME_THRESHOLD);
Review Comment:
thanks , but i dont know “Holding the timeThreshold in a private variable ”
means what? thanks again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]