Created
February 12, 2013 23:30
-
-
Save kgorman/4774497 to your computer and use it in GitHub Desktop.
Profiler Agg Framework Example1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db.system.profile.aggregate( | |
{ $group : | |
{ _id :"$op", | |
count:{$sum:1}, | |
"max response time":{$max:"$millis"}, | |
"avg response time":{$avg:"$millis"} | |
} | |
}); | |
{ | |
"result" : [ | |
{ "_id" : "command", "count" : 1, "max response time" : 0, "avg response time" : 0 }, | |
{ "_id" : "query", "count" : 12, "max response time" : 571, "avg response time" : 5 }, | |
{ "_id" : "update", "count" : 842, "max response time" : 111, "avg response time" : 40 }, | |
{ "_id" : "insert", "count" : 1633, "max response time" : 2, "avg response time" : 1 } | |
], | |
"ok" : 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment