diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2016-06-23 11:49:38 -0400 |
---|---|---|
committer | Kevin Albertson <kevin.albertson@10gen.com> | 2016-06-24 17:40:02 -0400 |
commit | 6c755905c31ac284d88077500ebba021d20b3626 (patch) | |
tree | 5d9926babdd696004b830a0a1664d58cef4b9e2c /src/mongo/db/db_raii.cpp | |
parent | 4d14ddf06f49ff55c90451dcff2da1a6edcaf366 (diff) | |
download | mongo-6c755905c31ac284d88077500ebba021d20b3626.tar.gz |
SERVER-5905 Add operation latency histogram
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r-- | src/mongo/db/db_raii.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index f1bc7208092..945dee16aab 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -109,11 +109,13 @@ AutoGetCollectionForRead::~AutoGetCollectionForRead() { // Report time spent in read lock auto currentOp = CurOp::get(_txn); Top::get(_txn->getClient()->getServiceContext()) - .record(currentOp->getNS(), + .record(_txn, + currentOp->getNS(), currentOp->getLogicalOp(), -1, // "read locked" _timer.micros(), - currentOp->isCommand()); + currentOp->isCommand(), + currentOp->getReadWriteType()); } void AutoGetCollectionForRead::_ensureMajorityCommittedSnapshotIsValid(const NamespaceString& nss) { @@ -206,11 +208,13 @@ OldClientContext::~OldClientContext() { auto currentOp = CurOp::get(_txn); Top::get(_txn->getClient()->getServiceContext()) - .record(currentOp->getNS(), + .record(_txn, + currentOp->getNS(), currentOp->getLogicalOp(), _txn->lockState()->isWriteLocked() ? 1 : -1, _timer.micros(), - currentOp->isCommand()); + currentOp->isCommand(), + currentOp->getReadWriteType()); } |