]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: add perfcounters for commands
authorSage Weil <sage@inktank.com>
Thu, 13 Jun 2013 22:13:18 +0000 (15:13 -0700)
committerSage Weil <sage@inktank.com>
Thu, 13 Jun 2013 22:16:19 +0000 (15:16 -0700)
This matches the other counters we maintain for other kinds of ops.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/Objecter.cc

index 0afc56805ea2138aa4da5d67d236bcb17679b4eb..ad7481f42caeb61b604c8d86ce22f29b5ce7ed3c 100644 (file)
@@ -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());
 }