HdrHistogram / hdrhistogram-go

A pure Go implementation of Gil Tene's HDR Histogram.
MIT License
435 stars 64 forks source link

CumulativeDistribution: Bracket should track value #4

Closed giltene closed 9 years ago

giltene commented 9 years ago

Looking at Bracket, I think it that for it to be useful for reporting cumulative distribution, it should be tracking the value, Either instead if or in addition to the count.

In a world with non-repeating precise values, the count for a given quantile is a direct function of the total count in the data set. count = f(total_count, quantile) would be invariant to the data values recorded. In a world with repeating values (and/orimprecise ones) the cumulative count can "jump" by more than one between distinguishable value levels, but will still approximate the invariant behavior, so it doesn't add much useful info.

Including the actual count iterated to along with the value at the quantile can be useful for sanity checking (I use that for printing the cumulative count column right next to the value, which makes it easy to tell when multiple iterated percentile levels fall within the same sub-bucket, this is sometimes useful when looking at the very high nines)