diff options
author | jinichu <jinnybyun@gmail.com> | 2018-07-09 16:20:51 -0400 |
---|---|---|
committer | jinichu <jinnybyun@gmail.com> | 2018-07-09 16:20:51 -0400 |
commit | f7dbf6f03397ef6317d8e9dc7bbb32e41a0745d1 (patch) | |
tree | eb83afc22ed93af2fd08e534b0665173d1133713 /src/mongo/db/curop.cpp | |
parent | 53be2bca4962b281e7b1cc17742d8c857a338aa4 (diff) | |
download | mongo-f7dbf6f03397ef6317d8e9dc7bbb32e41a0745d1.tar.gz |
SERVER-35434 Added an OpDebug object to SingleTransactionStats to track aggregate OpDebug stats
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index bc61bb30574..df504a19ca2 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -722,6 +722,16 @@ void OpDebug::AdditiveMetrics::add(const AdditiveMetrics& otherMetrics) { writeConflicts = addOptionalLongs(writeConflicts, otherMetrics.writeConflicts); } +bool OpDebug::AdditiveMetrics::equals(const AdditiveMetrics& otherMetrics) { + return keysExamined == otherMetrics.keysExamined && docsExamined == otherMetrics.docsExamined && + nMatched == otherMetrics.nMatched && nModified == otherMetrics.nModified && + ninserted == otherMetrics.ninserted && ndeleted == otherMetrics.ndeleted && + nmoved == otherMetrics.nmoved && keysInserted == otherMetrics.keysInserted && + keysDeleted == otherMetrics.keysDeleted && + prepareReadConflicts == otherMetrics.prepareReadConflicts && + writeConflicts == otherMetrics.writeConflicts; +} + void OpDebug::AdditiveMetrics::incrementWriteConflicts(long long n) { if (!writeConflicts) { writeConflicts = 0; |