mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
metrics: fix inclusive boundary in runtime histogram percentile
When a percentile threshold equals the cumulative count at a bucket boundary, assign that bucket instead of skipping to the next one.
This commit is contained in:
parent
ab134b2101
commit
104f6495bf
1 changed files with 1 additions and 1 deletions
|
|
@ -224,7 +224,7 @@ func (h *runtimeHistogramSnapshot) computePercentiles(thresh []float64) {
|
|||
for i, count := range h.internal.Counts {
|
||||
totalCount += float64(count)
|
||||
|
||||
for len(thresh) > 0 && thresh[0] < totalCount {
|
||||
for len(thresh) > 0 && thresh[0] <= totalCount {
|
||||
thresh[0] = h.internal.Buckets[i]
|
||||
thresh = thresh[1:]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue