prometheus/model/labels
Bryan Boreham ac4f8a5e23
[ENHANCEMENT] TSDB: Improve calculation of space used by labels (#13880)
* [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-12-16 09:42:52 +00:00
..
labels_common.go promql: Fix various UTF-8 bugs related to quoting 2024-12-04 14:18:59 -05:00
labels_dedupelabels_test.go [PERF] Labels: faster varint for dedupelabels 2024-06-21 11:57:09 +01:00
labels_dedupelabels.go [ENHANCEMENT] TSDB: Improve calculation of space used by labels (#13880) 2024-12-16 09:42:52 +00:00
labels_stringlabels.go [ENHANCEMENT] TSDB: Improve calculation of space used by labels (#13880) 2024-12-16 09:42:52 +00:00
labels_test.go promql: Fix various UTF-8 bugs related to quoting 2024-12-04 14:18:59 -05:00
labels.go [ENHANCEMENT] TSDB: Improve calculation of space used by labels (#13880) 2024-12-16 09:42:52 +00:00
matcher_test.go Quote label name in matchers when needed 2024-05-08 16:58:51 +02:00
matcher.go Fix Matcher.String() with empty label name 2024-06-13 18:46:35 +02:00
regexp_test.go FastRegexMatcher: use stack memory for lowercase copy of string 2024-10-28 16:28:58 +00:00
regexp.go FastRegexMatcher: use stack memory for lowercase copy of string 2024-10-28 16:28:58 +00:00
sharding_dedupelabels.go Labels: use single byte as separator - small speedup 2024-07-15 09:47:16 +01:00
sharding_stringlabels.go Labels: use single byte as separator - small speedup 2024-07-15 09:47:16 +01:00
sharding_test.go Add ShardedPostings() support to TSDB (#10421) 2024-01-29 11:57:27 +00:00
sharding.go Labels: use single byte as separator - small speedup 2024-07-15 09:47:16 +01:00
test_utils.go Labels: Call NewScratchBuilder in test_utils 2024-02-23 13:50:27 +00:00