]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc: Add split_op statistic
authorAlex Ainscow <aainscow@uk.ibm.com>
Thu, 5 Feb 2026 13:30:36 +0000 (13:30 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Fri, 6 Feb 2026 10:31:31 +0000 (10:31 +0000)
This statistic counts the number of OPs which have been submitted using the
split op mechanism.  It allows a user to check how useful this is and
performance/development to check that this mechanism is being used in
any given application.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osdc/Objecter.cc

index a65226e7ea5781c6750f29f790fef5d7cf727374..4e9057ca69ba8d6ac4e935abae453d11425129a0 100644 (file)
@@ -191,6 +191,8 @@ enum {
   l_osdc_replica_read_bounced,
   l_osdc_replica_read_completed,
 
+  l_osdc_split_op_reads,
+
   l_osdc_last,
 };
 
@@ -404,6 +406,8 @@ void Objecter::init()
                        "Operations bounced by replica to be resent to primary");
     pcb.add_u64_counter(l_osdc_replica_read_completed, "replica_read_completed",
                        "Operations completed by replica");
+    pcb.add_u64_counter(l_osdc_split_op_reads, "split_op_reads",
+                    "Client read ops split by SplitOp");
 
     logger = pcb.create_perf_counters();
     cct->get_perfcounters_collection()->add(logger);
@@ -2514,6 +2518,10 @@ void Objecter::_op_submit(Op *op, shunique_lock<ceph::shared_mutex>& sul, ceph_t
 
   ldout(cct, 10) << __func__ << " op " << op << dendl;
 
+  if (op->target.flags & CEPH_OSD_FLAG_FORCE_OSD) {
+    logger->inc(l_osdc_split_op_reads);
+  }
+
   // pick target
   ceph_assert(op->session == NULL);
   OSDSession *s = NULL;