prometheus/rules
Bryan Boreham b987afa7ef labels: simplify call to get Labels from Builder
It took a `Labels` where the memory could be re-used, but in practice
this hardly ever benefitted. Especially after converting `relabel.Process`
to `relabel.ProcessBuilder`.

Comparing the parameter to `nil` was a bug; `EmptyLabels` is not `nil`
so the slice was reallocated multiple times by `append`.

Lastly `Builder.Labels()` now estimates that the final size will depend
on labels added and deleted.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-22 17:05:20 +00:00
..
fixtures fixes yamllint errors 2021-06-12 12:47:47 +02:00
alerting.go labels: simplify call to get Labels from Builder 2023-03-22 17:05:20 +00:00
alerting_test.go rules: two places need to call EmptyLabels 2023-02-22 15:14:07 +00:00
manager.go rules: no longer force CounterResetHint to Gauge 2023-03-14 14:22:07 -06:00
manager_test.go rules: no longer force CounterResetHint to Gauge 2023-03-14 14:22:07 -06:00
origin.go Panic if rule type was not expected 2023-01-20 10:27:50 +02:00
origin_test.go rules: two places need to call EmptyLabels 2023-02-22 15:14:07 +00:00
recording.go labels: simplify call to get Labels from Builder 2023-03-22 17:05:20 +00:00
recording_test.go Avoid unnecessary allocations in recording rule evaluation (#11812) 2023-03-08 12:57:19 +00:00