From: Igor Fedotov Date: Fri, 1 Mar 2019 15:00:57 +0000 (+0300) Subject: tools/ceph-objectstore-tool: dump perf counters on competion. X-Git-Tag: v15.1.0~2694^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=55ffa5e9439c36779c46a4cffdd141f804538f39;p=ceph-ci.git tools/ceph-objectstore-tool: dump perf counters on competion. Performed if debug mode is enabled Signed-off-by: Igor Fedotov --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 1ba6075d157..c3234f06e0d 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -4232,6 +4232,16 @@ int main(int argc, char **argv) } out: + if (debug) { + ostringstream ostr; + Formatter* f = Formatter::create("json-pretty", "json-pretty", "json-pretty"); + cct->get_perfcounters_collection()->dump_formatted(f, false); + ostr << "ceph-objectstore-tool "; + f->flush(ostr); + delete f; + cout << ostr.str() << std::endl; + } + int r = fs->umount(); if (r < 0) { cerr << "umount failed: " << cpp_strerror(r) << std::endl;