prometheus/model/histogram
Filip Petkovski 10a82f87fd
Enable reusing memory when converting between histogram types
The 'ToFloat' method on integer histograms currently allocates new memory
each time it is called.

This commit adds an optional *FloatHistogram parameter that can be used
to reuse span and bucket slices. It is up to the caller to make sure the
input float histogram is not used anymore after the call.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-08 10:22:59 +01:00
..
float_histogram.go Merge pull request #13208 from linasm/panic-free-float-histogram-add-sub 2023-12-07 20:12:21 +01:00
float_histogram_test.go Merge pull request #13208 from linasm/panic-free-float-histogram-add-sub 2023-12-07 20:12:21 +01:00
generic.go Reuse slices in [Float]Histogram.ReduceResolution 2023-11-28 15:45:31 +02:00
generic_test.go Reuse slices in [Float]Histogram.ReduceResolution 2023-11-28 15:45:31 +02:00
histogram.go Enable reusing memory when converting between histogram types 2023-12-08 10:22:59 +01:00
histogram_test.go Enable reusing memory when converting between histogram types 2023-12-08 10:22:59 +01:00
test_utils.go Move histogram validation code to model/histogram 2023-11-03 16:17:24 +02:00