]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: add perf counter for rate of replay
authorJohn Spray <john.spray@redhat.com>
Tue, 2 Aug 2016 12:01:17 +0000 (13:01 +0100)
committerJohn Spray <john.spray@redhat.com>
Fri, 5 Aug 2016 11:22:53 +0000 (12:22 +0100)
Useful for watching the progress of a daemon
in standby-replay or replay.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDLog.cc
src/mds/MDLog.h

index e4999a4b90aa4c52bd445b9f153a83df9cd8327c..bc018fabcc6e1458e00c85deee1df95a9e0c5ea4 100644 (file)
@@ -75,6 +75,8 @@ void MDLog::create_logger()
   plb.add_u64(l_mdl_rdpos, "rdpos", "Journaler  read position");
   plb.add_u64(l_mdl_jlat, "jlat", "Journaler flush latency");
 
+  plb.add_u64_counter(l_mdl_replayed, "replayed", "Events replayed");
+
   // logger
   logger = plb.create_perf_counters();
   g_ceph_context->get_perfcounters_collection()->add(logger);
@@ -1369,6 +1371,7 @@ void MDLog::_replay_thread()
         if (mds->is_daemon_stopping()) {
           return;
         }
+        logger->inc(l_mdl_replayed);
         le->replay(mds);
       }
     }
index 663eac6dc0f09f19a1091d176bdfcc6faca1ca78..e7658534117cfc8c80f7b2fedabffa851d030f3c 100644 (file)
@@ -34,6 +34,7 @@ enum {
   l_mdl_wrpos,
   l_mdl_rdpos,
   l_mdl_jlat,
+  l_mdl_replayed,
   l_mdl_last,
 };