summaryrefslogtreecommitdiffstats
path: root/src/test/perf_counters.cc
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2011-10-20 22:58:14 +0200
committerSage Weil <sage.weil@dreamhost.com>2011-10-20 22:58:14 +0200
commit863e5b0407a7ba3157e32f0b1089912da8ff8686 (patch)
tree600156bf7f2db4d6f1ddaa30d7d4e58057f225c8 /src/test/perf_counters.cc
parentMerge remote branch 'gh/wip-unfound' (diff)
downloadceph-863e5b0407a7ba3157e32f0b1089912da8ff8686.tar.xz
ceph-863e5b0407a7ba3157e32f0b1089912da8ff8686.zip
perfcounters: fix unit test
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/test/perf_counters.cc')
-rw-r--r--src/test/perf_counters.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/perf_counters.cc b/src/test/perf_counters.cc
index 90792a7ccac..fa4f178d839 100644
--- a/src/test/perf_counters.cc
+++ b/src/test/perf_counters.cc
@@ -77,7 +77,7 @@ static PerfCounters* setup_test_perfcounters1(CephContext *cct)
TEST(PerfCounters, SinglePerfCounters) {
PerfCountersCollection *coll = g_ceph_context->GetPerfCountersCollection();
PerfCounters* fake_pf = setup_test_perfcounters1(g_ceph_context);
- coll->logger_add(fake_pf);
+ coll->add(fake_pf);
g_ceph_context->_conf->set_val_or_die("admin_socket", get_rand_socket_path());
g_ceph_context->_conf->apply_changes(NULL);
AdminSocketClient client(get_rand_socket_path());
@@ -116,11 +116,11 @@ static PerfCounters* setup_test_perfcounter2(CephContext *cct)
TEST(PerfCounters, MultiplePerfCounters) {
PerfCountersCollection *coll = g_ceph_context->GetPerfCountersCollection();
- coll->logger_clear();
+ coll->clear();
PerfCounters* fake_pf1 = setup_test_perfcounters1(g_ceph_context);
PerfCounters* fake_pf2 = setup_test_perfcounter2(g_ceph_context);
- coll->logger_add(fake_pf1);
- coll->logger_add(fake_pf2);
+ coll->add(fake_pf1);
+ coll->add(fake_pf2);
g_ceph_context->_conf->set_val_or_die("admin_socket", get_rand_socket_path());
g_ceph_context->_conf->apply_changes(NULL);
AdminSocketClient client(get_rand_socket_path());
@@ -136,14 +136,14 @@ TEST(PerfCounters, MultiplePerfCounters) {
ASSERT_EQ(sd("{'test_perfcounter_1':{'element1':6,'element2':0,'element3':"
"{'avgcount':0,'sum':0}},'test_perfcounter_2':{'foo':0,'bar':0}}"), msg);
- coll->logger_remove(fake_pf2);
+ coll->remove(fake_pf2);
ASSERT_EQ("", client.get_message(&msg));
ASSERT_EQ(sd("{'test_perfcounter_1':{'element1':6,'element2':0,"
"'element3':{'avgcount':0,'sum':0}}}"), msg);
ASSERT_EQ("", client.get_schema(&msg));
ASSERT_EQ(sd("{'test_perfcounter_1':{'element1':{'type':2},"
"'element2':{'type':1},'element3':{'type':5}}}"), msg);
- coll->logger_clear();
+ coll->clear();
ASSERT_EQ("", client.get_message(&msg));
ASSERT_EQ("{}", msg);
}