-
Notifications
You must be signed in to change notification settings - Fork 188
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
(Local)IntHistogram #254
Comments
Mostly, we use the histogram to record operation duration in TiKV, using Int can help us, but we need to update Grafana. |
Yes, currently we use seconds and we need to update to milliseconds in order to use IntHistogram. |
Is there a block of example code which could be used to benchmark this? |
@hdost today histograms don't support anything other than |
Yes indeed I wasn't sure if the |
Relates to tikv#254
Relates to tikv#254
I've started on a rather large draft here: #388 before going too much further down the rabbit hole I wouldn't mind a once over. It doesn't compile and I am well aware of hat but I am curious if this path is worth pursing |
We need to implement a int version for Histogram, like Counter and Gauge, since atomic float implementation (loop +
lock cmpxchg
) is much slower than native atomic integer instruction (lock add
).For example, according to benchmarks:
When there is no concurrent write, float atomic implemented via CAS is 1x slower than int atomic.
When there is concurrent write, float atomic is 5x slower than int atomic.
The text was updated successfully, but these errors were encountered: