summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.h
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2018-09-04 15:42:43 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2018-09-07 23:13:42 -0400
commitb5ca922655a1d0a438c39c38b2c4434016069cb7 (patch)
tree514a178784e763803db5cad8d72c56fc77518a91 /src/mongo/db/curop.h
parenta8fe1d82c3c5484c7e8a6402a34bc45ea11d06f1 (diff)
downloadmongo-b5ca922655a1d0a438c39c38b2c4434016069cb7.tar.gz
SERVER-26854 LockStats for sub-operations should not include wait time for previous operations
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r--src/mongo/db/curop.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h
index a87be82213b..1c039d8f06c 100644
--- a/src/mongo/db/curop.h
+++ b/src/mongo/db/curop.h
@@ -558,6 +558,10 @@ public:
_planSummary = std::move(summary);
}
+ const boost::optional<SingleThreadedLockStats> getLockStatsBase() {
+ return _lockStatsBase;
+ }
+
private:
class CurOpStack;
@@ -600,6 +604,8 @@ private:
int _numYields{0};
std::string _planSummary;
+ boost::optional<SingleThreadedLockStats>
+ _lockStatsBase; // This is the snapshot of lock stats taken when curOp is constructed.
};
/**