pnowojski commented on a change in pull request #18181:
URL: https://github.com/apache/flink/pull/18181#discussion_r776720683



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/TimerGaugeTest.java
##########
@@ -82,5 +93,12 @@ public void testGetWithoutUpdate() {
         gauge.markEnd();
 
         assertThat(gauge.getValue(), is(0L));
+        assertThat(gauge.getMaxSingleMeasurement(), is(0L));

Review comment:
       I've added it in the first test case.

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/TimerGaugeTest.java
##########
@@ -82,5 +93,12 @@ public void testGetWithoutUpdate() {
         gauge.markEnd();
 
         assertThat(gauge.getValue(), is(0L));
+        assertThat(gauge.getMaxSingleMeasurement(), is(0L));
+    }
+
+    @Test
+    public void testGetMaxMeasurement() {
+        ManualClock clock = new ManualClock(42_000_000);
+        TimerGauge gauge = new TimerGauge(clock);

Review comment:
       Ops sorry. I've started to write a dedicate test but later decided to 
add assertions to existing tests and I forgot to delete this stub.
   
   Removed.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricNames.java
##########
@@ -71,6 +71,10 @@ public static String currentInputWatermarkName(int index) {
     public static final String TASK_IDLE_TIME = "idleTimeMs" + SUFFIX_RATE;
     public static final String TASK_BUSY_TIME = "busyTimeMs" + SUFFIX_RATE;
     public static final String TASK_BACK_PRESSURED_TIME = 
"backPressuredTimeMs" + SUFFIX_RATE;
+    public static final String TASK_SOFT_BACK_PRESSURED_TIME =
+            "softBackPressuredTimeMs" + SUFFIX_RATE;
+    public static final String TASK_HARD_BACK_PRESSURED_TIME =
+            "hardBackPressuredTimeMs" + SUFFIX_RATE;

Review comment:
       Yeah, I get your point.




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