MCPcopy
hub / github.com/prometheus/client_golang / getCumulativeCounts

Function getCumulativeCounts

prometheus/histogram_test.go:331–342  ·  view source on GitHub ↗
(vars []float64)

Source from the content-addressed store, hash-verified

329}
330
331func getCumulativeCounts(vars []float64) []uint64 {
332 counts := make([]uint64, len(testBuckets))
333 for _, v := range vars {
334 for i := len(testBuckets) - 1; i >= 0; i-- {
335 if v > testBuckets[i] {
336 break
337 }
338 counts[i]++
339 }
340 }
341 return counts
342}
343
344func TestBuckets(t *testing.T) {
345 got := LinearBuckets(-15, 5, 6)

Callers 2

TestHistogramConcurrencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected