findingrish commented on code in PR #17360:
URL: https://github.com/apache/druid/pull/17360#discussion_r1829303037


##########
docs/operations/metrics.md:
##########
@@ -103,7 +109,13 @@ Most metric values reset each emission period, as 
specified in `druid.monitoring
 |`query/failed/count`|Number of failed queries.|This metric is only available 
if the `QueryCountStatsMonitor` module is included.||
 |`query/interrupted/count`|Number of queries interrupted due to 
cancellation.|This metric is only available if the `QueryCountStatsMonitor` 
module is included.||
 |`query/timeout/count`|Number of timed out queries.|This metric is only 
available if the `QueryCountStatsMonitor` module is included.||
-|`mergeBuffer/pendingRequests`|Number of requests waiting to acquire a batch 
of buffers from the merge buffer pool.|This metric is only available if the 
`QueryCountStatsMonitor` module is included.||
+|`mergeBuffer/pendingRequests`|Number of requests waiting to acquire a batch 
of buffers from the merge buffer pool.|This metric is only available if the 
`GroupByStatsMonitor` module is included.|Should be 0.|
+|`mergeBuffer/usedCount`|Number of merge buffers used from the merge buffer 
pool.|This metric is only available if the `GroupByStatsMonitor` module is 
included.|Depends on the number of groupBy queries needing merge buffers.|
+|`mergeBuffer/acquisitionTimeNs`|Total time in nanoseconds to acquire merge 
buffer for groupBy queries.|This metric is only available if the 
`GroupByStatsMonitor` module is included.|Should be as low as possible.|
+|`mergeBuffer/acquisitionCount`|Number of times groupBy queries acquired merge 
buffers.|This metric is only available if the `GroupByStatsMonitor` module is 
included.|Depends on the number of groupBy queries needing merge buffers.|
+|`groupBy/spilledQueries`|Number of groupBy queries that have spilled onto the 
disk.|This metric is only available if the `GroupByStatsMonitor` module is 
included.|Varies|
+|`groupBy/spilledBytes`|Number of bytes spilled on the disk by the groupBy 
queries.|This metric is only available if the `GroupByStatsMonitor` module is 
included.|Varies|
+|`groupBy/mergeDictionarySize`|Size of on-heap merge dictionary in bytes.|This 
metric is only available if the `GroupByStatsMonitor` module is 
included.|Varies|

Review Comment:
   Moved them to a new section.



##########
server/src/main/java/org/apache/druid/server/metrics/QueryCountStatsMonitor.java:
##########
@@ -72,9 +75,11 @@ public boolean doMonitor(ServiceEmitter emitter)
       }
     }
 
-    long pendingQueries = this.mergeBufferPool.getPendingRequests();
-    emitter.emit(builder.setMetric("mergeBuffer/pendingRequests", 
pendingQueries));
+    if (emitMergeBufferPendingRequests) {
+      long pendingQueries = this.mergeBufferPool.getPendingRequests();
+      emitter.emit(builder.setMetric("mergeBuffer/pendingRequests", 
pendingQueries));
+    }
+

Review Comment:
   Ideally, all the merge buffer metrics should be reported from the new 
monitor. This change is to ensure backward compatibility.



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