mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix(nhcb): inconsistent compact number
Should always use 0 to avoid accounting unused buckets. One point of nhcb is to not store empty buckets. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
665d1ba0cc
commit
bcb1213010
|
@ -500,8 +500,8 @@ something_bucket{a="b",le="+Inf"} 9 # {id="something-test"} 2e100 123.000
|
|||
Schema: histogram.CustomBucketsSchema,
|
||||
Count: 9,
|
||||
Sum: 42123.0,
|
||||
PositiveSpans: []histogram.Span{{Offset: 0, Length: 3}},
|
||||
PositiveBuckets: []int64{8, -8, 1},
|
||||
PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}, {Offset: 1, Length: 1}},
|
||||
PositiveBuckets: []int64{8, -7},
|
||||
CustomValues: []float64{0.0, 1.0}, // We do not store the +Inf boundary.
|
||||
},
|
||||
lset: labels.FromStrings("__name__", "something", "a", "b"),
|
||||
|
|
|
@ -196,7 +196,7 @@ func (h TempHistogram) convertToIntegerHistogram(count uint64) (*histogram.Histo
|
|||
return nil, nil, h.err
|
||||
}
|
||||
|
||||
return rh.Compact(2), nil, nil
|
||||
return rh.Compact(0), nil, nil
|
||||
}
|
||||
|
||||
func (h TempHistogram) convertToFloatHistogram() (*histogram.Histogram, *histogram.FloatHistogram, error) {
|
||||
|
|
Loading…
Reference in a new issue