aho135 commented on code in PR #19627:
URL: https://github.com/apache/druid/pull/19627#discussion_r3855976830
##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByStatsProvider.java:
##########
@@ -224,9 +263,26 @@ public void mergeBufferAcquisitionTime(long delay)
mergeBufferAcquisitionTimeNs.addAndGet(delay);
}
- public void maxMergeBufferUsedBytes(long bytes)
+ /**
+ * Accumulates the peak merge-buffer usage of one grouper (slice). Despite
the previous "max" naming, this method
+ * sums across the slices a query holds; see {@link #mergeBufferUsedBytes}.
+ */
+ public void addMergeBufferUsedBytes(long bytes)
{
- maxMergeBufferUsedBytes.addAndGet(bytes);
+ mergeBufferUsedBytes.addAndGet(bytes);
+ }
+
+ /**
+ * Records one slice's peak fill ratio (1.0 iff it spilled), kept as a max
across the query's slices; see
+ * {@link #maxSpillProximity}. Clamped to [0, 1]; NaN is ignored so a
never-initialized grouper contributes nothing.
+ */
+ public void sliceUsage(double proximity)
Review Comment:
Renamed to `spillProximity(double)` in be68bc4. Went with `spillProximity`
over `spillProximityUsage` so it pairs with the existing `getSpillProximity()`
getter and matches the noun-style accumulators (`spilledBytes`,
`dictionarySize`) — and drops the "usage" association entirely.
--
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]