prometheus/promql
Bryan Boreham 74b73d1e2c
Labels: Add DropMetricName function, used in PromQL (#13446)
This function is called very frequently when executing PromQL functions,
and we can do it much more efficiently inside Labels.

In the common case that `__name__` comes first in the labels, we simply
re-point to start at the next label, which is nearly free.

`DropMetricName` is now so cheap I removed the cache - benchmarks show
everything still goes faster.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-01-25 11:48:49 +01:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296) 2024-01-15 10:29:53 +00:00
testdata promql: use natural sort in sort_by_label and sort_by_label_desc (#13411) 2024-01-16 21:34:09 -03:00
bench_test.go Expand benchmark 2023-12-25 11:30:29 +01:00
engine.go Labels: Add DropMetricName function, used in PromQL (#13446) 2024-01-25 11:48:49 +01:00
engine_test.go Revert "Adding small test update for temp dir using t.TempDir (#13293)" 2023-12-30 19:17:30 +00:00
functions.go Labels: Add DropMetricName function, used in PromQL (#13446) 2024-01-25 11:48:49 +01:00
functions_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
fuzz.go remove obsolete build tag 2024-01-17 22:26:32 +08:00
fuzz_test.go remove obsolete build tag 2024-01-17 22:26:32 +08:00
promql_test.go sort_by_label: Switch to feature flag 2023-11-28 15:10:12 +01:00
quantile.go PromQL: ignore small errors for bucketQuantile (#13153) 2023-11-25 00:05:38 +01:00
quantile_test.go PromQL: ignore small errors for bucketQuantile (#13153) 2023-11-25 00:05:38 +01:00
query_logger.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
query_logger_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
test.go sort_by_label: Switch to feature flag 2023-11-28 15:10:12 +01:00
test_test.go Add context argument to Querier.Select (#12660) 2023-09-12 12:37:38 +02:00
value.go Optimize histogram iterators (#13340) 2024-01-23 17:02:14 +01:00
value_test.go Shortcut ContainsSameLabelset() (#11000) 2022-07-13 15:18:10 +05:30