prometheus/model/labels
Bryan Boreham 82a8c6abe2
[ENHANCEMENT] Optimize regexps with multiple prefixes (#13843)
For example `foo.*|bar.*|baz.*`. Instead of checking each one in turn,
we build a map of prefixes, then check the smaller set that could match
the string supplied.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Improve testing and readability

Address review comments on #13843

Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-07-03 18:45:36 +01:00
..
labels.go [BUGFIX] labels: don't modify original labels in DropMetricName (#13845) 2024-03-27 10:35:17 +00:00
labels_common.go Refactor toNormalisedLower: shorter and slightly faster. (#14299) 2024-06-18 09:57:37 +00:00
labels_dedupelabels.go Labels: further optimisation for dedupelabels 2024-06-21 16:46:13 +01:00
labels_dedupelabels_test.go [PERF] Labels: faster varint for dedupelabels 2024-06-21 11:57:09 +01:00
labels_stringlabels.go Refactor toNormalisedLower: shorter and slightly faster. (#14299) 2024-06-18 09:57:37 +00:00
labels_test.go Labels benchmarks: remove artefact of small symbol-tables 2024-06-21 16:49:10 +01:00
matcher.go Fix Matcher.String() with empty label name 2024-06-13 18:46:35 +02:00
matcher_test.go Quote label name in matchers when needed 2024-05-08 16:58:51 +02:00
regexp.go [ENHANCEMENT] Optimize regexps with multiple prefixes (#13843) 2024-07-03 18:45:36 +01:00
regexp_test.go [ENHANCEMENT] Optimize regexps with multiple prefixes (#13843) 2024-07-03 18:45:36 +01:00
sharding.go Add dedupelabels tag to not build regular labels 2024-02-23 13:50:27 +00:00
sharding_dedupelabels.go labels: update copyright dates 2024-02-26 11:45:25 +00:00
sharding_stringlabels.go Add ShardedPostings() support to TSDB (#10421) 2024-01-29 11:57:27 +00:00
sharding_test.go Add ShardedPostings() support to TSDB (#10421) 2024-01-29 11:57:27 +00:00
test_utils.go Labels: Call NewScratchBuilder in test_utils 2024-02-23 13:50:27 +00:00