emitskevich-blp commented on code in PR #15889:
URL: https://github.com/apache/kafka/pull/15889#discussion_r1610219832


##########
clients/src/main/java/org/apache/kafka/common/metrics/stats/Rate.java:
##########
@@ -82,7 +82,7 @@ public long windowSize(MetricConfig config, long now) {
          * but this approach does not account for sleeps. SampledStat only 
creates samples whenever record is called,
          * if no record is called for a period of time that time is not 
accounted for in windowSize and produces incorrect results.
          */
-        long totalElapsedTimeMs = now - stat.oldest(now).lastWindowMs;
+        long totalElapsedTimeMs = now - stat.oldest(now).startTimeMs;

Review Comment:
   Applied



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to