summaryrefslogtreecommitdiff
path: root/src/mongo/db/instance.cpp
diff options
context:
space:
mode:
authorKevin Albertson <kevin.albertson@10gen.com>2016-06-23 11:49:38 -0400
committerKevin Albertson <kevin.albertson@10gen.com>2016-06-24 17:40:02 -0400
commit6c755905c31ac284d88077500ebba021d20b3626 (patch)
tree5d9926babdd696004b830a0a1664d58cef4b9e2c /src/mongo/db/instance.cpp
parent4d14ddf06f49ff55c90451dcff2da1a6edcaf366 (diff)
downloadmongo-6c755905c31ac284d88077500ebba021d20b3626.tar.gz
SERVER-5905 Add operation latency histogram
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r--src/mongo/db/instance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index d3d1a1c34de..43fcee9df85 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -71,6 +71,7 @@
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/service_context.h"
#include "mongo/db/stats/counters.h"
+#include "mongo/db/stats/top.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_options.h"
#include "mongo/platform/atomic_word.h"
@@ -686,6 +687,9 @@ void assembleResponse(OperationContext* txn,
debug.executionTime = currentOp.totalTimeMillis();
logThreshold += currentOp.getExpectedLatencyMs();
+ Top::get(txn->getServiceContext())
+ .incrementGlobalLatencyStats(
+ txn, currentOp.totalTimeMicros(), currentOp.getReadWriteType());
if (shouldLogOpDebug || debug.executionTime > logThreshold) {
Locker::LockerInfo lockerInfo;