diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2016-06-23 11:49:38 -0400 |
---|---|---|
committer | Kyle Suarez <kyle.suarez@mongodb.com> | 2016-06-23 17:47:06 -0400 |
commit | c7794350b056cdea85e1c6185a7dda4579936179 (patch) | |
tree | e310fe6e872390cdfe18ab756c51aab1e34a064c /src/mongo/db/db_raii.cpp | |
parent | acb5215fd12e5d018bfec9207d9a18dd35df65a6 (diff) | |
download | mongo-c7794350b056cdea85e1c6185a7dda4579936179.tar.gz |
SERVER-5905 Add operation latency histogram
Signed-off-by: Kyle Suarez <kyle.suarez@mongodb.com>
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r-- | src/mongo/db/db_raii.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index f1bc7208092..c945912363f 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -109,7 +109,8 @@ 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(), @@ -206,7 +207,8 @@ 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(), |