prometheus/tsdb/index
Bryan Boreham cf92cd2688 tsdb: sort values for Postings only when required
In the head and in v1 postings on disk, it makes no difference whether
postings are sorted. Only for v2 does the code step through in order.
So, move the sorting to where it is required, and thus skip it entirely
in the head.

Label values in on-disk blocks are already sorted, but `slices.Sort` is
very fast on already-sorted data so we don't bother checking.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-01-05 14:05:54 +00:00
..
index.go tsdb: sort values for Postings only when required 2023-01-05 14:05:54 +00:00
index_test.go Simplify IndexReader.Series interface 2022-12-19 15:22:09 +00:00
postings.go Update package tsdb/index for new labels.Labels type 2022-12-19 15:22:09 +00:00
postings_test.go Tidy postingsWithIndexHeap (#10123) 2022-01-06 16:03:44 +05:30
postingsstats.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
postingsstats_test.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00