Currently MongoDB internally tracks things at microsecond granularity, yet exports such as currentOp only show "secs_running", making web level latencies all rounded down to zero.
It may make sense to provide highly accurate elapsed data (as "secs" is already derived from it), and easiest way is probably just by having a separate counter as msecs (or usecs, if need be for a 64bit value).
The change is minimal yet the value for systems administrator is relatively large:
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 2b74983..01d78ec 100644
— a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -219,6 +219,7 @@ namespace mongo {
if( a )
{ b.append("secs_running", elapsedSeconds() ); + b.append("msecs_running", elapsedMillis() ); }b.append( "op" , opToString( _op ) );
- is duplicated by
-
SERVER-2778 Microsecond or nanosecond accuracy in query timing/currentop
- Closed
-
SERVER-3057 Add millisecond view to current operation object
- Closed