mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 08:26:19 +01:00
fae589bb83
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> |
||
---|---|---|
.. | ||
testdata | ||
config_test.go | ||
config.go | ||
debug.go | ||
debug.qtpl | ||
debug.qtpl.go | ||
graphite_test.go | ||
graphite_timing_test.go | ||
graphite.go | ||
if_expression_test.go | ||
if_expression_timing_test.go | ||
if_expression.go | ||
relabel_test.go | ||
relabel_timing_test.go | ||
relabel.go | ||
scrape_url_test.go | ||
scrape_url.go |