diff --git a/model/textparse/nhcbparse_test.go b/model/textparse/nhcbparse_test.go index 859bcc1cb7..db0d3e4fdb 100644 --- a/model/textparse/nhcbparse_test.go +++ b/model/textparse/nhcbparse_test.go @@ -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"), diff --git a/util/convertnhcb/convertnhcb.go b/util/convertnhcb/convertnhcb.go index 21ae62b3cb..daf30d20cf 100644 --- a/util/convertnhcb/convertnhcb.go +++ b/util/convertnhcb/convertnhcb.go @@ -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) {