-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(metrics): use exponential_buckets #2101
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2101 +/- ##
========================================
Coverage 70.82% 70.83%
========================================
Files 639 640 +1
Lines 81173 81485 +312
========================================
+ Hits 57494 57717 +223
- Misses 23679 23768 +89
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
571b13f
to
9201963
Compare
Changed. @Little-Wallace |
"Histogram of time spent from compacting shared buffer to remote storage.", | ||
buckets | ||
"Histogram of time spent from compacting shared buffer to remote storage", | ||
exponential_buckets(0.0001, 2.0, 16).unwrap() // max 3s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3s is too small.
we can start since 1ms and we can observe 64s at most
let opts = histogram_opts!( | ||
"state_store_write_build_l0_sst_duration", | ||
"Total time of batch_write_build_table that have been issued to state store", | ||
buckets | ||
exponential_buckets(0.001, 2.0, 16).unwrap() // max 32s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest start from 1ms because most
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What's changed and what's your intention?
I refactored all Histogram buckets from
DEFAULT_BUCKETS+scale
ormanually setting every bucket
to exponential_buckets.Reasons:
DEFAULT_BUCKETS+scale
, it's more flexible.manually setting every bucket
, it's easier to tune or understand.Currently, the parameters used in this PR are set according to the previous parameters and my experience.
Checklist
Refer to a related PR or issue link (optional)
close #1006