From 21d29a72edb3f0a8e9a28cd6535b8655162da137 Mon Sep 17 00:00:00 2001 From: Michal Maslanka Date: Wed, 1 Feb 2023 12:59:04 +0100 Subject: [PATCH] s/probe: added ability to clear registered metrics Signed-off-by: Michal Maslanka --- src/v/storage/probe.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/v/storage/probe.h b/src/v/storage/probe.h index c22034d6bf3fe..0f1d70a54d4e8 100644 --- a/src/v/storage/probe.h +++ b/src/v/storage/probe.h @@ -94,6 +94,10 @@ class probe { void set_compaction_ratio(double r) { _compaction_ratio = r; } int64_t get_batch_parse_errors() const { return _batch_parse_errors; } + /** + * Clears all probe related metrics + */ + void clear_metrics() { _metrics.clear(); } private: uint64_t _partition_bytes = 0;