mjsax commented on code in PR #16162:
URL: https://github.com/apache/kafka/pull/16162#discussion_r1626750822


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuateRatioSlidingWindow.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.kafka.streams.processor.internals;
+
+import java.util.LinkedList;
+import java.util.Queue;
+
+public class PunctuateRatioSlidingWindow {
+    private final Queue<RatioTimeStamp> ratioQueue;
+    private final long windowSizeMillis;
+
+    public PunctuateRatioSlidingWindow(long windowSizeMillis) {
+        this.windowSizeMillis = windowSizeMillis;
+        this.ratioQueue = new LinkedList<>();
+    }
+
+    public void update(double ratio){
+        long currentTimeMillis = System.currentTimeMillis();

Review Comment:
   We should never call `System.currentTimeMillis()` directly, but always use 
the `Time` interface. Otherwise we cannot mock it.



-- 
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