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/instance.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/instance.cpp')
-rw-r--r-- | src/mongo/db/instance.cpp | 3 |
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; |