|
$collStats allows getting back reads, writes and commands for each collection. It also supports histograms of latencies along with counts. Output would be something like this:
{ "ns" : "test.matrices",
|
"host" : mongo.example.net:27017",
|
"localTime" : ISODate("2017-10-06T19:43:56.599Z"),
|
"latencyStats" :
|
{ "reads" :
|
{ "histogram" : [
|
{ "micros" : NumberLong(16),
|
"count" : NumberLong(3) },
|
{ "micros" : NumberLong(32),
|
"count" : NumberLong(1) },
|
{ "micros" : NumberLong(128),
|
"count" : NumberLong(1) } ],
|
"latency" : NumberLong(264),
|
"ops" : NumberLong(5) },
|
"writes" :
|
{ "histogram" : [
|
{ "micros" : NumberLong(32),
|
"count" : NumberLong(1) },
|
{ "micros" : NumberLong(64),
|
"count" : NumberLong(3) },
|
{ "micros" : NumberLong(24576),
|
"count" : NumberLong(1) } ],
|
"latency" : NumberLong(27659),
|
"ops" : NumberLong(5) },
|
"commands" :
|
{ "histogram" : [ ],
|
"latency" : NumberLong(0),
|
"ops" : NumberLong(0) }
|
}
|
}
|
This is new as of 3.4. Would that satisfy the per-collection requirement?
|