Fly-Style commented on code in PR #18819:
URL: https://github.com/apache/druid/pull/18819#discussion_r2620625373


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -4381,6 +4374,39 @@ public ConcurrentHashMap<PartitionIdType, 
SequenceOffsetType> getPartitionOffset
     return partitionOffsets;
   }
 
+  /**
+   * Calculates the average poll-idle-ratio metric across all active tasks.
+   * This metric indicates how much time the consumer spends idle waiting for 
data.
+   *
+   * @return the average poll-idle-ratio across all tasks, or 1 (full idle) if 
no tasks or metrics are available
+   */
+  public double getPollIdleRatioMetric()
+  {
+    Map<String, Map<String, Object>> taskMetrics = getStats(true);
+    if (taskMetrics.isEmpty()) {
+      return 1.;

Review Comment:
   Scaling up might be an overkill in that scenario - nothing may happen and 
instead we will waste a resources.
   **0.5** looks optimal for me (during the implementation i thought between 
0.5 and 1).



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