Provide resource accounting for every operation

XMLWordPrintableJSON

    • Storage Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For every operation/command report resources used, like other stats from the operation.

      In addition to reporting it back inline also provide a record and the ability to collect it out-of-band from the operation itself (like in the profile collection).

      A good example of this would be to account for storage during write operations:

      db.b.update({}, {$set:{a:1}})
      Update WriteResult({
      	"ok" : 1,
      	"nModified" : 12,
      	"n" : 12,
      	"resourcesUsed" : {cpu: 1000, storage:{collection:136, indexes:42}, memory:56000}, // cpu units = cycles?, storage/mem bytes
      	"lastOp" : Timestamp(1389888187, 1),
      	"writeErrors" : [
      	]
      })
      // Remove frees space and results in negative storage
      db.b.remove({a:1})
      Remove WriteResult({
      	"ok" : 1,
      	"n" : 12,
      	"resourcesUsed" : {cpu: 988, storage:{collection:-234234, indexes:-42234}, memory:16000000}, 
      	"lastOp" : Timestamp(1389888187, 1),
      	"writeErrors" : [
      	]
      })
      

            Assignee:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: