Implement aggregation stage to return resource consumption metrics

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2020-10-05
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Implement an agg pipeline stage "$operationMetrics" to return global resource consumption metrics.

      This stage accepts a "clearMetrics" flag. When set to true, will clear the metrics after building the response to the command.

      The command response format will be the following:

      { ok: 1, 
        cursor: {
          firstBatch: [ 
            { db: "<dbname>", 
              primaryMetrics: \{ docBytesRead: 0, docUnitsRead: 0, idxEntriesRead: 0, keysSorted: 0 }, 
              secondaryMetrics: \{ docBytesRead: 0, docUnitsRead: 0, idxEntriesRead: 0, keysSorted: 0 }, 
              cpuMillis: 0, 
              docBytesWritten: 0, 
              docUnitsWritten: 0, 
              docUnitsReturned: 0 }, 
            \{ ... } ] ,
          id : NumberLong("668860441858272439") 
        }
      }
      

            Assignee:
            Louis Williams
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: