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
committerKyle Suarez <kyle.suarez@mongodb.com>2016-06-23 17:47:06 -0400
commitc7794350b056cdea85e1c6185a7dda4579936179 (patch)
treee310fe6e872390cdfe18ab756c51aab1e34a064c /src/mongo/db/instance.cpp
parentacb5215fd12e5d018bfec9207d9a18dd35df65a6 (diff)
downloadmongo-c7794350b056cdea85e1c6185a7dda4579936179.tar.gz
SERVER-5905 Add operation latency histogram
Signed-off-by: Kyle Suarez <kyle.suarez@mongodb.com>
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r--src/mongo/db/instance.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index d3d1a1c34de..4858d50b4ce 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,8 @@ void assembleResponse(OperationContext* txn,
debug.executionTime = currentOp.totalTimeMillis();
logThreshold += currentOp.getExpectedLatencyMs();
+ Top::get(txn->getServiceContext())
+ .incrementGlobalLatencyStats(txn, currentOp.totalTimeMicros());
if (shouldLogOpDebug || debug.executionTime > logThreshold) {
Locker::LockerInfo lockerInfo;