prometheus/cmd/promtool
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
..
testdata Fix promtool check config not erroring properly on failures (#10952) 2022-07-01 14:38:49 +02:00
archive.go refactor (package cmd): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10733) 2022-05-24 16:58:59 +10:00
backfill.go refactor (package cmd): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10733) 2022-05-24 16:58:59 +10:00
backfill_test.go storage: allow re-use of iterators 2022-12-15 18:32:45 +00:00
debug.go refactor (package cmd): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10733) 2022-05-24 16:58:59 +10:00
main.go Document command line tools 2023-03-13 14:20:55 +01:00
main_test.go Document command line tools 2023-03-13 14:20:55 +01:00
rules.go labels: simplify call to get Labels from Builder 2023-03-22 17:05:20 +00:00
rules_test.go Update package cmd/promtool tests for new labels.Labels type 2022-12-19 15:22:09 +00:00
sd.go Merge pull request #12048 from bboreham/faster-targets 2023-03-09 11:10:01 +00:00
sd_test.go cmd/promtool: in tests use labels.FromStrings 2022-09-09 13:34:49 +02:00
tsdb.go promtool: add support of selecting timeseries for TSDB dump 2023-01-20 15:46:23 +03:30
unittest.go Update package cmd/promtool for new labels.Labels type 2022-12-19 15:22:09 +00:00
unittest_test.go Disable time based retention in tests (#8818) 2022-01-02 23:46:03 +01:00