From 51e03c5f4246f3bdaca5ccd6be33ed104623f8f1 Mon Sep 17 00:00:00 2001 From: lisali Date: Wed, 21 Jun 2017 07:21:30 -0400 Subject: [PATCH] fio_ceph_objectstore: Print db_statistics when rocksdb_perf is enabled Currently users can't use ceph admin command to get db stats when running bluestore fio plugin. This patch is to print db stats when rocksdb_perf is set in config file. Signed-off-by: Xiaoyan Li --- src/test/fio/fio_ceph_objectstore.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/fio/fio_ceph_objectstore.cc b/src/test/fio/fio_ceph_objectstore.cc index cb02d76625a..604c44c59f1 100644 --- a/src/test/fio/fio_ceph_objectstore.cc +++ b/src/test/fio/fio_ceph_objectstore.cc @@ -87,10 +87,16 @@ struct Engine { ostringstream ostr; Formatter* f = Formatter::create("json-pretty", "json-pretty", "json-pretty"); os->dump_perf_counters(f); + ostr << "FIO plugin "; f->flush(ostr); + if (g_conf->rocksdb_perf) { + os->get_db_statistics(f); + ostr << "FIO get_db_statistics "; + f->flush(ostr); + } delete f; os->umount(); - dout(0) << "FIO plugin " << ostr.str() << dendl; + dout(0) << ostr.str() << dendl; } } }; -- 2.39.5