GWphua opened a new pull request, #18934:
URL: https://github.com/apache/druid/pull/18934

   <!-- Thanks for trying to help us make Apache Druid be the best it can be! 
Please fill out as much of the following information as is possible (where 
relevant, and remove it when irrelevant) to help make the intention and scope 
of this PR clear in order to ease review. -->
   
   <!-- Please read the doc for contribution 
(https://github.com/apache/druid/blob/master/CONTRIBUTING.md) before making 
this PR. Also, once you open a PR, please _avoid using force pushes and 
rebasing_ since these make it difficult for reviewers to see what you've 
changed in response to their reviews. See [the 'If your pull request shows 
conflicts with master' 
section](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#if-your-pull-request-shows-conflicts-with-master)
 for more details. -->
   
   ### Description
   
   Split from #18731 
   
   #### Motivation: 
   GroupByStatsMonitor will aggregate the group by query metrics, but sometimes 
we do not want to know the SUM, but what is the actual true value
   
   This will be helpful in cases:
   - What is the max merge buffer highest acquisition time? 
   - What is the maximum merge dictionary size used so I am more informed on 
the value of `druid.query.groupBy.maxMergingDictionarySize`.
   - What is the maximum bytes spilled in a single query? 
   
   #### Release note
   <!-- Give your best effort to summarize your changes in a couple of 
sentences aimed toward Druid users. 
   
   If your change doesn't have end user impact, you can skip this section.
   
   For tips about how to write a good release note, see [Release 
notes](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#release-notes).
   
   -->
   
   Added metrics `mergeBuffer/maxAcquisitionTimeNs`, `groupBy/maxSpilledBytes` 
and `groupBy/maxMergeDictionarySize` to track peak resource usage per query.
   
   <hr>
   
   ##### Key changed/added classes in this PR
   * GroupByStatsProvider.java
   * GroupByStatsMonitor.java
   * GroupByStatsProviderTest.java
   * GroupByStatsMonitorTest.java
   * metrics.md
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items apply to every PR. Remove the items which are not done or 
not relevant to the PR. None of the items from the checklist below are strictly 
necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added documentation for new or modified features or behaviors.
   - [x] a release note entry in the PR description.
   - [x] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [x] been tested in a test Druid cluster.


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