VictoriaMetrics/lib/promrelabel
Roman Khavronenko 5f46f8a11d
lib/promrelabel: speedup label match by __name__ (#6432)
The change adds a fastpath for `equalValue` comparisons against
`__name__` label by avoiding calls to `toCanonicalLabelName` func. This
speedups matches by metric name like `'foo'`. See bench stats below:
```
benchcmp old.txt new.txt

benchmark                                           old ns/op     new ns/op     delta
BenchmarkIfExpression/equal_label:_last-10          35.6          35.1          -1.18%
BenchmarkIfExpression/equal_label:_middle-10        18.3          17.3          -5.41%
BenchmarkIfExpression/equal_label:_first-10         1.20          1.24          +2.74%
BenchmarkIfExpression/equal___name__:_last-10       10.1          4.96          -50.75%
BenchmarkIfExpression/equal___name__:_middle-10     5.79          3.16          -45.41%
BenchmarkIfExpression/equal___name__:_first-10      1.17          1.05          -9.76%
```

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-06-07 15:44:48 +02:00
..
testdata lib/promrelabel: add support for keepequal and dropequal relabeling actions 2022-12-21 20:04:55 -08:00
config_test.go all: fix golangci-lint(revive) warnings after 0c0ed61ce7 2024-04-02 23:16:29 +03:00
config.go lib/logstorage: work-in-progress 2024-05-24 03:06:55 +02:00
debug.go all: consistently use %w instead of %s in when error is passed to fmt.Errorf() 2023-10-25 21:24:03 +02:00
debug.qtpl all: replace old https://docs.victoriametrics.com/relabeling.html url with the new one - https://docs.victoriametrics.com/relabeling/ 2024-04-18 03:22:22 +02:00
debug.qtpl.go all: replace old https://docs.victoriametrics.com/relabeling.html url with the new one - https://docs.victoriametrics.com/relabeling/ 2024-04-18 03:22:22 +02:00
graphite_test.go lib/promrelabel: support action: graphite relabeling 2022-06-16 20:24:22 +03:00
graphite_timing_test.go lib/promrelabel: support action: graphite relabeling 2022-06-16 20:24:22 +03:00
graphite.go app,lib: fix typos in comments (#3804) 2023-02-13 13:27:13 +01:00
if_expression_test.go lib/promrelabel: add support for a list of series selectors at IfExpression 2023-07-24 17:08:52 -07:00
if_expression_timing_test.go lib/promrelabel: speedup label match by __name__ (#6432) 2024-06-07 15:44:48 +02:00
if_expression.go lib/promrelabel: speedup label match by __name__ (#6432) 2024-06-07 15:44:48 +02:00
relabel_test.go all: fix golangci-lint(revive) warnings after 0c0ed61ce7 2024-04-02 23:16:29 +03:00
relabel_timing_test.go lib/promrelabel: properly replace : char with _ in metric names when -usePromCompatibleNaming command-line flag is set 2023-08-14 16:14:42 +02:00
relabel.go lib/protoparser/opentelemetry: follow-up after 47892b4a4c 2024-04-03 02:25:29 +03:00
scrape_url_test.go lib/promrelabel: make target url from labels on target relabel page (#3882) 2023-03-20 22:07:52 -07:00
scrape_url.go lib/promrelabel: make target url from labels on target relabel page (#3882) 2023-03-20 22:07:52 -07:00