songxiaosheng commented on code in PR #12868: URL: https://github.com/apache/dubbo/pull/12868#discussion_r1288535191
########## dubbo-metrics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/collector/AggregateMetricsCollector.java: ########## @@ -159,9 +159,9 @@ private void onRTEvent(RequestEvent event) { MethodMetric metric = new MethodMetric(applicationModel, event.getAttachmentValue(MetricsConstants.INVOCATION)); long responseTime = event.getTimePair().calc(); if (enableRt) { - TimeWindowQuantile quantile = ConcurrentHashMapUtils.computeIfAbsent(rt, metric, - k -> new TimeWindowQuantile(DEFAULT_COMPRESSION, bucketNum, timeWindowSeconds)); - quantile.add(responseTime); + ConcurrentDoubleHistogram concurrentDoubleHistogram = ConcurrentHashMapUtils.computeIfAbsent(rt, metric, Review Comment: Sliding windows are used for aggregation statistics of minimum and maximum values. Unlike the percentile algorithm above, sliding windows use thread safe algorithms -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org