From: Kefu Chai Date: Fri, 21 Dec 2018 10:34:22 +0000 (+0800) Subject: test/crimson/monc: start/stop perf counter X-Git-Tag: v14.1.0~356^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9622fac190da6fa1ad6a3d28f8a9bd2565043127;p=ceph.git test/crimson/monc: start/stop perf counter 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 --- diff --git a/src/test/crimson/test_monc.cc b/src/test/crimson/test_monc.cc index 9fe541b42e3..78f71e43a67 100644 --- a/src/test/crimson/test_monc.cc +++ b/src/test/crimson/test_monc.cc @@ -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(); + }); }); }