We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8812c78 commit 3f44817Copy full SHA for 3f44817
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ScalingMetricEvaluator.java
@@ -456,7 +456,10 @@ public static double getRate(
456
return Double.NaN;
457
}
458
459
- return 1000 * (last - first) / Duration.between(firstTs, lastTs).toMillis();
+ long tsDiff = Duration.between(firstTs, lastTs).toMillis();
460
+ tsDiff = Math.max(tsDiff, 1);
461
+
462
+ return 1000 * (last - first) / tsDiff;
463
464
465
public static double getAverage(
0 commit comments