fix(metrics): add cumulative count as histogram expects
This commit is contained in:
parent
3122b6e630
commit
3a1e4fdc3c
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