FrankChen021 commented on code in PR #20626:
URL: https://github.com/apache/druid/pull/20626#discussion_r4306045548


##########
server/src/test/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderatorTest.java:
##########
@@ -189,10 +189,10 @@ public void testSimpleIngestion() throws Exception
       SegmentGenerationMetrics segmentGenerationMetrics = tester.getMetrics();
       Assertions.assertEquals(2, segmentGenerationMetrics.numPersists());
       Assertions.assertEquals(3, segmentGenerationMetrics.rowOutput());
-      Assertions.assertTrue(segmentGenerationMetrics.persistTimeMillis() > 0);
+      Assertions.assertTrue(segmentGenerationMetrics.persistTimeMillis() >= 0);

Review Comment:
   Thanks — I reviewed 1 of 1 changed files, and the concern remains 
actionable. A good starting point is SegmentGenerationMetrics: add 
nanosecond-backed duration accessors and copy them in snapshot(), then update 
StreamAppenderator and BatchAppenderator to record elapsed nanoseconds. In 
TaskRealtimeMetricsMonitor, subtract nanosecond totals before converting the 
delta to milliseconds for the existing metric. Update the test to assert 
positive nanosecond timing and the millisecond conversion; apply the same 
treatment to merge timing, then update the PR title and description.
   
   <!-- mergelens:review -->



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to