akalash commented on a change in pull request #16772:
URL: https://github.com/apache/flink/pull/16772#discussion_r688401559



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/throughput/ThroughputCalculator.java
##########
@@ -36,36 +36,49 @@ public ThroughputCalculator(Clock clock, int 
numberOfSamples) {
     }
 
     public void incomingDataSize(long receivedDataSize) {
-        resumeMeasurement();
+        // Force resuming measurement.
+        if (measurementStartTime == NOT_TRACKED) {
+            measurementStartTime = clock.absoluteTimeMillis();
+        }

Review comment:
       in 99% the condition `measurementStartTime == NOT_TRACKED` would be 
false so it doesn't make sense to calculate the absolute time millis and then 
doesn't use 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to