prometheus/tsdb/index
Arve Knudsen 06d54fcc6c
[PERF] TSDB: Optimize inverse matching (#14144)
Simple follow-up to #13620. Modify `tsdb.PostingsForMatchers` to use the optimized tsdb.IndexReader.PostingsForLabelMatching method also for inverse matching.

Introduce method `PostingsForAllLabelValues`, to avoid changing the existing method.

The performance is much improved for a subset of the cases; there are up to
~60% CPU gains and ~12.5% reduction in memory usage. 

Remove `TestReader_InversePostingsForMatcherHonorsContextCancel` since
`inversePostingsForMatcher` only passes `ctx` to `IndexReader` implementations now.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-11-19 15:49:01 +00:00
..
index.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
index_test.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
postings.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
postings_test.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
postingsstats.go Move from golang.org/x/exp/slices into slices now that we only support Go >= 1.21 2024-02-28 14:54:53 +01:00
postingsstats_test.go Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00