summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_applier_impl.cpp
diff options
context:
space:
mode:
authorDaniel Morilha <daniel.morilha@mongodb.com>2022-06-30 13:16:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-30 14:11:31 +0000
commitfae8410364c1f02ee62e77076ef60b8ee418368f (patch)
tree9909ee46de6ef7822236a468bfff95a6e61385dd /src/mongo/db/repl/oplog_applier_impl.cpp
parent50a8545e444e8bfc7e3892a1319515302b568739 (diff)
downloadmongo-fae8410364c1f02ee62e77076ef60b8ee418368f.tar.gz
SERVER-65987 ServerStatusMetric API refresh
Diffstat (limited to 'src/mongo/db/repl/oplog_applier_impl.cpp')
-rw-r--r--src/mongo/db/repl/oplog_applier_impl.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp
index 575035711e0..d897241134b 100644
--- a/src/mongo/db/repl/oplog_applier_impl.cpp
+++ b/src/mongo/db/repl/oplog_applier_impl.cpp
@@ -63,16 +63,13 @@ MONGO_FAIL_POINT_DEFINE(pauseBatchApplicationAfterWritingOplogEntries);
MONGO_FAIL_POINT_DEFINE(hangAfterRecordingOpApplicationStartTime);
// The oplog entries applied
-Counter64 opsAppliedStats;
-ServerStatusMetricField<Counter64> displayOpsApplied("repl.apply.ops", &opsAppliedStats);
+CounterMetric opsAppliedStats("repl.apply.ops");
// Tracks the oplog application batch size.
-Counter64 oplogApplicationBatchSize;
-ServerStatusMetricField<Counter64> displayOplogApplicationBatchSize("repl.apply.batchSize",
- &oplogApplicationBatchSize);
+CounterMetric oplogApplicationBatchSize("repl.apply.batchSize");
+
// Number and time of each ApplyOps worker pool round
-TimerStats applyBatchStats;
-ServerStatusMetricField<TimerStats> displayOpBatchesApplied("repl.apply.batches", &applyBatchStats);
+auto& applyBatchStats = makeServerStatusMetric<TimerStats>("repl.apply.batches");
/**
* Used for logging a report of ops that take longer than "slowMS" to apply. This is called