prometheus/cmd/promtool
Steve Kuznetsov fd6c852567
promtool: backfill: allow configuring block duration (#8919)
* promtool: backfill: allow configuring block duration

When backfilling large amounts of data across long periods of time, it
may in certain circumstances be useful to use a longer block duration to
increase the efficiency and speed of the backfilling process. This patch
adds a flag --block-duration-power to allow a user to choose the power N
where the block duration is 2^(N+1)h.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

* promtool: use sub-tests in backfill testing

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

* backfill: add messages to tests for clarity

When someone new breaks a test, seeing "expected: false, got: true" is
really not useful. A nice message helps here.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

* backfill: test long block durations

A test that uses a long block duration to write bigger blocks is added.
The check to make sure all blocks are the default duration is removed.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2021-06-29 14:53:38 +05:30
..
testdata fixes yamllint errors 2021-06-12 12:47:47 +02:00
archive.go Make file permissions set to allow for wider umask options. (#7782) 2020-08-12 23:23:17 +02:00
backfill.go promtool: backfill: allow configuring block duration (#8919) 2021-06-29 14:53:38 +05:30
backfill_test.go promtool: backfill: allow configuring block duration (#8919) 2021-06-29 14:53:38 +05:30
debug.go collect cpu and trace profiles with the promtool debug command (#4897) 2018-11-23 17:57:31 +02:00
main.go promtool: backfill: allow configuring block duration (#8919) 2021-06-29 14:53:38 +05:30
main_test.go promtool: Add URL scheme when not provided (#7956) 2020-12-23 19:52:04 +01:00
rules.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
rules_test.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
tsdb.go promtool: backfill: allow configuring block duration (#8919) 2021-06-29 14:53:38 +05:30
unittest.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
unittest_test.go promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00