-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
util/quantile: import quantile library #82146
Conversation
consider putting this library in |
Good idea, moved to |
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 mod the suggestion
// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error | ||
// properties. | ||
func NewHighBiased(epsilon float64) *Stream { | ||
ƒ := func(s *stream, r float64) float64 { |
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.
unicode variables, fun!
oh, also retitle the PR/commit to be |
For upcoming outliers work in #79451, we'll re-use the biased streaming quantiles implementation underlying the prometheus client library's [summary][1] type. But in order to monitor and possibly constrain our memory usage, we'll need a way to measure the size of each `quantile.Stream`. That functionality is not available upstream, and contributions are explicitly [not being accepted][2] (and the [original upstream][3], from bmizerany, lacks further functionality and is similarly inactive), so we vendor the library here, unmodified from its [v1.0.1][4], in advance of adding the methods we need. [1]: https://prometheus.io/docs/practices/histograms/ [2]: beorn7/perks#5 (comment) [3]: https://github.com/bmizerany/perks [4]: https://github.com/beorn7/perks/tree/v1.0.1 Release note: None
bors r+ |
Build succeeded: |
For upcoming outliers work in #79451, we'll re-use the biased streaming
quantiles implementation underlying the prometheus client library's
summary type.
But in order to monitor and possibly constrain our memory usage, we'll
need a way to measure the size of each
quantile.Stream
. Thatfunctionality is not available upstream, and contributions are
explicitly not being accepted (and the original upstream, from
bmizerany, lacks further functionality and is similarly inactive), so we
vendor the library here, unmodified from its v1.0.1, in advance of
adding the methods we need.
Release note: None