Merge pull request 'fix(metrics): add cumulative count as histogram expects' (#57) from tn-fix-histogram-quantile-monotonicity into main
Reviewed-on: #57
This commit is contained in:
commit
c18b992f04
1 changed files with 3 additions and 1 deletions
|
@ -193,10 +193,12 @@ func (m *Metrics) collectReqeustDataMetrics(ch chan<- prometheus.Metric, queue *
|
|||
sum += latency
|
||||
count++
|
||||
|
||||
var cumulativeCount uint64
|
||||
for _, bound := range bucketBounds {
|
||||
if latency <= bound {
|
||||
buckets[bound]++
|
||||
cumulativeCount++
|
||||
}
|
||||
buckets[bound] += cumulativeCount
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue