From 359ff9131669e89b9867a8f728510578f94dc167 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 17 Apr 2018 13:43:10 -0700 Subject: [PATCH] modules/console: Add db stats convenience command to passthru to prop rocksdb.stats. --- modules/console.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/console.cc b/modules/console.cc index 5714cfa02..5dabffdfe 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -772,6 +772,22 @@ catch(const std::out_of_range &e) return true; } +bool +console_cmd__db__stats(opt &out, const string_view &line) +{ + const params param{line, " ", + { + "dbname", "column" + }}; + + return console_cmd__db__prop(out, fmt::snstringf + { + 1024, "%s %s rocksdb.stats", + param.at(0), + param.at(1) + }); +} + bool console_cmd__db__files(opt &out, const string_view &line) try