]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: instrument pushes, pull requests
authorSage Weil <sage.weil@dreamhost.com>
Thu, 23 Jun 2011 20:39:11 +0000 (13:39 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 23 Jun 2011 21:57:26 +0000 (14:57 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/ReplicatedPG.cc

index d51ca8d4eed74037ae755a758f059ec3da087b7f..4edb735a70983f1dd0e5951d574b00299b8a2a60 100644 (file)
@@ -675,6 +675,7 @@ void OSD::open_logger()
     osd_logtype.add_inc(l_osd_sop_push_inb, "sop_push_inb");
     osd_logtype.add_inc(l_osd_sop_push_lat, "sop_push_lat");
 
+    osd_logtype.add_inc(l_osd_pull,      "pull");       // pull requests sent
     osd_logtype.add_inc(l_osd_push,      "push");       // push
     osd_logtype.add_inc(l_osd_push_outb, "push_outb");  // pushed bytes
 
index b52f440d1178c85ece9a80b62eac9bc603de379f..486d4de17ef44e3330151a30238e770164dd889c 100644 (file)
@@ -77,6 +77,7 @@ enum {
   l_osd_sop_push_inb,
   l_osd_sop_push_lat,
 
+  l_osd_pull,
   l_osd_push,
   l_osd_push_outb,
 
index c94a53a1a5b49f793a93808badc1aef6fa1d07eb..52f431ee4237c991c8856f15d000b6c1fafa44d4 100644 (file)
@@ -3548,11 +3548,14 @@ void ReplicatedPG::send_pull_op(const sobject_t& soid, eversion_t v, bool first,
   subop->ops[0].op.op = CEPH_OSD_OP_PULL;
   subop->data_subset = data_subset;
   subop->first = first;
+
   // do not include clone_subsets in pull request; we will recalculate this
   // when the object is pushed back.
   //subop->clone_subsets.swap(clone_subsets);
-  osd->cluster_messenger->
-    send_message(subop, osd->osdmap->get_cluster_inst(fromosd));
+
+  osd->cluster_messenger->send_message(subop, osd->osdmap->get_cluster_inst(fromosd));
+
+  osd->logger->inc(l_osd_pull);
 }