Skip to content

Commit

Permalink
mds: add perf counter for rate of replay
Browse files Browse the repository at this point in the history
Useful for watching the progress of a daemon
in standby-replay or replay.

Signed-off-by: John Spray <john.spray@redhat.com>
  • Loading branch information
John Spray committed Aug 2, 2016
1 parent 7817531 commit 75e6436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mds/MDLog.cc
Expand Up @@ -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_replay, "replay", "Events replayed");

// logger
logger = plb.create_perf_counters();
g_ceph_context->get_perfcounters_collection()->add(logger);
Expand Down Expand Up @@ -1369,6 +1371,7 @@ void MDLog::_replay_thread()
if (mds->is_daemon_stopping()) {
return;
}
logger->inc(l_mdl_replay);
le->replay(mds);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/mds/MDLog.h
Expand Up @@ -34,6 +34,7 @@ enum {
l_mdl_wrpos,
l_mdl_rdpos,
l_mdl_jlat,
l_mdl_replay,
l_mdl_last,
};

Expand Down

0 comments on commit 75e6436

Please sign in to comment.