]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/onode-staged-tree: fix initialization in perf tool
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 20 May 2021 01:46:17 +0000 (09:46 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 21 May 2021 06:47:56 +0000 (14:47 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/tools/crimson/perf_staged_fltree.cc

index 8a5fdebcad49822013478288a11763dd5b16a047..24f9a6efe37d7252df3b0219906f0231d56b0101 100644 (file)
@@ -6,7 +6,9 @@
 #include <seastar/core/app-template.hh>
 #include <seastar/core/thread.hh>
 
+#include "crimson/common/config_proxy.h"
 #include "crimson/common/log.h"
+#include "crimson/common/perf_counters_collection.h"
 #include "crimson/os/seastore/onode_manager/staged-fltree/tree_utils.h"
 #include "crimson/os/seastore/onode_manager/staged-fltree/node_extent_manager.h"
 
@@ -98,6 +100,18 @@ seastar::future<> run(const bpo::variables_map& config) {
     ceph_assert(erase_ratio >= 0);
     ceph_assert(erase_ratio <= 1);
 
+    using crimson::common::sharded_conf;
+    sharded_conf().start(EntityName{}, string_view{"ceph"}).get();
+    seastar::engine().at_exit([] {
+      return sharded_conf().stop();
+    });
+
+    using crimson::common::sharded_perf_coll;
+    sharded_perf_coll().start().get();
+    seastar::engine().at_exit([] {
+      return sharded_perf_coll().stop();
+    });
+
     auto kvs = KVPool<test_item_t>::create_raw_range(
         str_sizes, onode_sizes,
         {range2[0], range2[1]},