Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13368

Need to expose better timing information in currentOps

      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 ) );

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            domas Domas Mituzas
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: