prometheus/model
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
..
exemplar Scraping: use slices.sort for exemplars 2023-11-24 14:42:26 +00:00
histogram Optimize histogram iterators (#13340) 2024-01-23 17:02:14 +01:00
labels Labels: Add DropMetricName function, used in PromQL (#13446) 2024-01-25 11:48:49 +01:00
metadata Move metric type definitions to common/model 2023-12-19 18:56:54 +00:00
relabel relabel: blank replacement deletes label post-regexp 2023-12-18 16:39:01 +00:00
rulefmt golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
textparse Merge pull request #13299 from vesari/add-unit-parser 2024-01-09 14:47:50 +01:00
timestamp Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
value Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00