prometheus/model
Bryan Boreham e1115ae58d
labels: improve Get method for stringlabels build (#12485)
Inline one call to `decodeString`, and skip decoding the value string
until we find a match for the name.
Do a quick check on the first character in each string,
and exit early if we've gone past - labels are sorted in order.

Also improve tests and benchmark:
* labels: test Get with varying lengths - it's not typical for Prometheus labels to all be the same length.
* extend benchmark with label not found

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-06-26 18:35:22 +01:00
..
exemplar Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
histogram Handle more arithmetic operators for native histograms (#12262) 2023-05-16 21:15:20 +02:00
labels labels: improve Get method for stringlabels build (#12485) 2023-06-26 18:35:22 +01:00
metadata Introduce TSDB changes for appending metadata to the WAL (#10972) 2022-07-19 10:58:52 +02:00
relabel labels: respect Set after Del in Builder (#12322) 2023-05-03 11:59:27 +01:00
rulefmt Add rulefmt tests 2023-01-19 10:44:35 +01:00
textparse textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02: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