]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/monc: start/stop perf counter
authorKefu Chai <kchai@redhat.com>
Fri, 21 Dec 2018 10:34:22 +0000 (18:34 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 18 Jan 2019 04:30:15 +0000 (12:30 +0800)
in CephContext::CephContext(), we assume that
ceph::common::local_perf_coll() is ready when a CephContext is to be
contructed. so we need to prepare start it before creating CephContext.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/test_monc.cc

index 9fe541b42e310aa73f4855ce4c87b38a2f9c1a83..78f71e43a675a0ac9be1040278fb4819df670dac 100644 (file)
@@ -22,6 +22,8 @@ static seastar::future<> test_monc()
     conf->name = init_params.name;
     conf->cluster = cluster;
     return conf.parse_config_files(conf_file_list);
+  }).then([] {
+    return ceph::common::sharded_perf_coll().start();
   }).then([] {
     return seastar::do_with(ceph::net::SocketMessenger{entity_name_t::OSD(0), "monc", 0},
                             [](ceph::net::Messenger& msgr) {
@@ -51,7 +53,9 @@ static seastar::future<> test_monc()
       });
     });
   }).finally([] {
-    return ceph::common::sharded_conf().stop();
+    return ceph::common::sharded_perf_coll().stop().then([] {
+      return ceph::common::sharded_conf().stop();
+    });
   });
 }