prometheus/tsdb/index
Bryan Boreham bd4fd1d2f7 [ENHANCEMENT] TSDB: Improve calculation of space used by labels
The labels for each series in the Head take up some some space in the
Postings index, but far more space in the `memSeries` structure.

Instead of having the Postings index calculate this overhead, which is
a layering violation, have the caller pass in a function to do it.

Provide three implementations of this function for the three Labels
versions.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-08-01 12:26:36 +01:00
..
index.go add unit test 2024-06-16 12:09:42 -07:00
index_test.go add unit test 2024-06-16 12:09:42 -07:00
postings.go [ENHANCEMENT] TSDB: Improve calculation of space used by labels 2024-08-01 12:26:36 +01:00
postings_test.go [ENHANCEMENT] TSDB: Improve calculation of space used by labels 2024-08-01 12:26:36 +01: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