summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-13 15:13:18 -0700
committerSage Weil <sage@inktank.com>2013-06-13 15:16:19 -0700
commitdb7d12103a42263e08a660ec33c74eeb70b6a20f (patch)
tree8100c56e86fb5d96919e4d902b152109bba19173
parent9a7ed0b3f8df5bd74133f216bad61ae71eab0816 (diff)
downloadceph-db7d12103a42263e08a660ec33c74eeb70b6a20f.tar.gz
osdc/Objecter: add perfcounters for commands
This matches the other counters we maintain for other kinds of ops. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osdc/Objecter.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index 0afc56805ea..ad7481f42ca 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -111,6 +111,10 @@ enum {
l_osdc_statfs_send,
l_osdc_statfs_resend,
+ l_osdc_command_active,
+ l_osdc_command_send,
+ l_osdc_command_resend,
+
l_osdc_map_epoch,
l_osdc_map_full,
l_osdc_map_inc,
@@ -190,6 +194,10 @@ void Objecter::init_unlocked()
pcb.add_u64_counter(l_osdc_statfs_send, "statfs_send");
pcb.add_u64_counter(l_osdc_statfs_resend, "statfs_resend");
+ pcb.add_u64(l_osdc_command_active, "command_active");
+ pcb.add_u64_counter(l_osdc_command_send, "command_send");
+ pcb.add_u64_counter(l_osdc_command_resend, "command_resend");
+
pcb.add_u64(l_osdc_map_epoch, "map_epoch");
pcb.add_u64_counter(l_osdc_map_full, "map_full");
pcb.add_u64_counter(l_osdc_map_inc, "map_inc");
@@ -2353,6 +2361,8 @@ int Objecter::_submit_command(CommandOp *c, tid_t *ptid)
if (c->map_check_error)
_send_command_map_check(c);
*ptid = tid;
+
+ logger->set(l_osdc_command_active, command_ops.size());
return 0;
}
@@ -2409,6 +2419,7 @@ void Objecter::_send_command(CommandOp *c)
m->set_data(c->inbl);
m->set_tid(c->tid);
messenger->send_message(m, c->session->con);
+ logger->inc(l_osdc_command_send);
}
void Objecter::_finish_command(CommandOp *c, int r, string rs)
@@ -2421,4 +2432,6 @@ void Objecter::_finish_command(CommandOp *c, int r, string rs)
c->onfinish->complete(r);
command_ops.erase(c->tid);
c->put();
+
+ logger->set(l_osdc_command_active, command_ops.size());
}