prometheus/tsdb/index
Oleg Zaytsev fe9cb5a803
Check context every 128 labels instead of 100 (#14118)
Follow up on https://github.com/prometheus/prometheus/pull/14096

As promised, I bring a benchmark, which shows a very small improvement
if context is checked every 128 iterations of label instead of every
100.

It's much easier for a computer to check modulo 128 than modulo 100.
This is a very small 0-2% improvement but I'd say this is one of the
hottest paths of the app so this is still relevant.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-05-21 11:30:43 +02:00
..
index.go Check context every 128 labels instead of 100 (#14118) 2024-05-21 11:30:43 +02:00
index_test.go tsdb/index: Refactor Reader tests (#14071) 2024-05-16 11:51:46 +02:00
postings.go tsdb/index/postings: fix missing lock unlock 2024-05-15 14:02:39 +02:00
postings_test.go Check context every 128 labels instead of 100 (#14118) 2024-05-21 11:30:43 +02: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 golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00