]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: add compare_and_write perfcounter
authorwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Mon, 12 Jun 2017 13:16:47 +0000 (21:16 +0800)
committerJason Dillaman <dillaman@redhat.com>
Wed, 26 Jul 2017 12:00:06 +0000 (08:00 -0400)
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
src/librbd/ImageCtx.cc
src/librbd/internal.h

index ed27beda2e53b1ea6dffaddce3d6f5304aa56898..c97b11505d7744e7c8ed6d5e1395d6b1edd5f382 100644 (file)
@@ -378,6 +378,9 @@ struct C_InvalidateCache : public Context {
     plb.add_u64_counter(l_librbd_ws, "ws", "WriteSames");
     plb.add_u64_counter(l_librbd_ws_bytes, "ws_bytes", "WriteSame data");
     plb.add_time_avg(l_librbd_ws_latency, "ws_latency", "WriteSame latency");
+    plb.add_u64_counter(l_librbd_cmp, "cmp", "CompareAndWrites");
+    plb.add_u64_counter(l_librbd_cmp_bytes, "cmp_bytes", "Data size in cmps");
+    plb.add_time_avg(l_librbd_cmp_latency, "cmp_latency", "Latency of cmps");
     plb.add_u64_counter(l_librbd_snap_create, "snap_create", "Snap creations");
     plb.add_u64_counter(l_librbd_snap_remove, "snap_remove", "Snap removals");
     plb.add_u64_counter(l_librbd_snap_rollback, "snap_rollback", "Snap rollbacks");
index deeaf9455957b9e2e3beb40af20c6c37959af893..72633f592ca3b9c08ae8f611c3b132f4b31b9dfc 100644 (file)
@@ -37,6 +37,10 @@ enum {
   l_librbd_ws_bytes,
   l_librbd_ws_latency,
 
+  l_librbd_cmp,
+  l_librbd_cmp_bytes,
+  l_librbd_cmp_latency,
+
   l_librbd_snap_create,
   l_librbd_snap_remove,
   l_librbd_snap_rollback,