prometheus/tsdb/chunkenc
beorn7 5f366e9b62 histograms: Improve tests and fix exposed bugs
This adds negative buckets and access of float histograms to
TestHistogramChunkSameBuckets and TestHistogramChunkBucketChanges.

It also exercises a specific pattern of reusing an iterator (one where
no access has happened).

This exposes two bugs (where entries for positive buckets where used
where the corresponding entries for negative buckets should have been
used). One was fixed in #11627 (not merged), which triggered the work
in this commit.

This commit fixes both issues, so #11627 can be closed.

It also simplifies the code in the histogramIterator.Next method that
aims to recycle existing slice capacity.

Furthermore, this is on top of the release-2.40 branch because we
should probably cut a bugfix release for this.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-12-12 00:08:23 +01:00
..
bstream.go tsdb: stop saving a copy of last 4 samples in memSeries (#11296) 2022-09-27 19:32:05 +05:30
bstream_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
chunk.go Fix merge conflicts 2022-10-11 22:53:37 +05:30
chunk_test.go tsdb: Rework iterators (#9877) 2021-11-29 13:24:23 +05:30
histogram.go histograms: Improve tests and fix exposed bugs 2022-12-12 00:08:23 +01:00
histogram_meta.go Fix merge conflicts 2022-10-11 22:53:37 +05:30
histogram_meta_test.go Merge branch 'main' into sparsehistogram 2021-11-17 19:57:31 +01:00
histogram_test.go histograms: Improve tests and fix exposed bugs 2022-12-12 00:08:23 +01:00
varbit.go tsdb: Update comment about a possible space optimization (#11303) 2022-09-15 13:11:57 +05:30
varbit_test.go Use more varbit in histogram chunks 2021-10-13 20:03:35 +02:00
xor.go chunkenc: Slightly optimize xorWrite/xoRead (#11476) 2022-10-20 15:08:01 +05:30
xor_test.go chunkenc: Slightly optimize xorWrite/xoRead (#11476) 2022-10-20 15:08:01 +05:30