Copilot commented on code in PR #17190:
URL: https://github.com/apache/pinot/pull/17190#discussion_r2513870393


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -1435,4 +1495,34 @@ public void accumulate(TaskCount other) {
       _aborted += other.getAborted();
     }
   }
+
+  public static class TaskStatusSummary {
+    private TaskCount _taskCount = new TaskCount();
+    private Map<String, Long> _subtaskWaitingTimes = new HashMap<>(); // 
subtask ID -> waiting time in minutes
+    private Map<String, Long> _subtaskRunningTimes = new HashMap<>(); // 
subtask ID -> running time in minutes

Review Comment:
   The comments state "waiting time in minutes" and "running time in minutes", 
but the actual implementation at lines 445-446 and 451-452 stores times in 
milliseconds (currentTime - startTime without conversion). Additionally, the 
metrics are emitted with TimeUnit.MILLISECONDS at lines 159-160 and 162-164 in 
TaskMetricsEmitter.java. Update the comments to reflect that times are stored 
in milliseconds.
   ```suggestion
       private Map<String, Long> _subtaskWaitingTimes = new HashMap<>(); // 
subtask ID -> waiting time in milliseconds
       private Map<String, Long> _subtaskRunningTimes = new HashMap<>(); // 
subtask ID -> running time in milliseconds
   ```



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