diff options
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h index f6e9371c894..99697caac08 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h @@ -69,6 +69,11 @@ public: void awaitHasExcessStonesOrDead(); + void getOplogStonesStats(BSONObjBuilder& builder) const { + builder.append("totalTimeProcessingMicros", _totalTimeProcessing.load()); + builder.append("processingMethod", _processBySampling.load() ? "sampling" : "scanning"); + } + boost::optional<OplogStones::Stone> peekOldestStoneIfNeeded() const; void popOldestStone(); @@ -140,8 +145,11 @@ private: // deque of oplog stones. int64_t _minBytesPerStone; - AtomicWord<long long> _currentRecords; // Number of records in the stone being filled. - AtomicWord<long long> _currentBytes; // Number of bytes in the stone being filled. + AtomicWord<long long> _currentRecords; // Number of records in the stone being filled. + AtomicWord<long long> _currentBytes; // Number of bytes in the stone being filled. + AtomicWord<int64_t> _totalTimeProcessing; // Amount of time spent scanning and/or sampling the + // oplog during start up, if any. + AtomicWord<bool> _processBySampling; // Whether the oplog was sampled or scanned. mutable stdx::mutex _mutex; // Protects against concurrent access to the deque of oplog stones. std::deque<OplogStones::Stone> _stones; // front = oldest, back = newest. |