]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fio_ceph_objectstore: Print db_statistics when rocksdb_perf is enabled 15796/head
authorlisali <xiaoyan.li@intel.com>
Wed, 21 Jun 2017 11:21:30 +0000 (07:21 -0400)
committerlisali <xiaoyan.li@intel.com>
Wed, 21 Jun 2017 11:31:36 +0000 (07:31 -0400)
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 <xiaoyan.li@intel.com>
src/test/fio/fio_ceph_objectstore.cc

index cb02d76625a1ef2daabb8597aaca655a122b41ea..604c44c59f1d2fd17016d51b72067b54eaf01b4e 100644 (file)
@@ -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;
     }
   }
 };