From: Samuel Just Date: Fri, 15 Aug 2025 23:15:20 +0000 (-0700) Subject: crimson/.../store-bench: support dumping seastar metrics X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9af3bc94fe33620ffb4b05596cda057f5da9215b;p=ceph.git crimson/.../store-bench: support dumping seastar metrics Signed-off-by: Samuel Just --- diff --git a/src/crimson/tools/store_bench/store-bench.cc b/src/crimson/tools/store_bench/store-bench.cc index e5f28ed28dd..879893afed9 100644 --- a/src/crimson/tools/store_bench/store-bench.cc +++ b/src/crimson/tools/store_bench/store-bench.cc @@ -88,6 +88,7 @@ private: unsigned duration = 0; public: unsigned num_concurrent_io = 16; + bool dump_metrics = false; std::chrono::duration get_duration() const { return std::chrono::seconds(duration); } @@ -100,6 +101,8 @@ public: ("duration", po::value(&duration)->required(), "how long in seconds the actual testing loop runs " "for") + ("dump-metrics", po::bool_switch(&dump_metrics), + "Dump JSON formatted metrics to stdout") ; return ret; } @@ -752,6 +755,14 @@ int main(int argc, char **argv) { } f.close_section(); } + if (common_options.dump_metrics) { + f.open_array_section("metrics_values"); + crimson::metrics::dump_metric_value_map( + seastar::scollectd::get_value_map(), + &f, + [](const auto &) { return true; }); + f.close_section(); + } f.close_section(); f.flush(std::cout);