First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
Histogram of the slowest collections (collections with the slowest queries) - number of queries per collection
This presents a histogram of slow collections
> db.system.profile.group({key: {ns: true}, initial: {count: 0}, reduce: function(obj,prev){ prev.count++;}})
Histogram of the slowest collections (collections with the slowest queries) - number of millies spent in each collection
> db.system.profile.group({key: {ns: true}, initial: {millis: 0}, reduce: function(obj, prev){ prev.millis += obj.millis;}})
> db.system.profile.find().sort({$natural: -1}).limit(1)
> db.system.profile.find().sort({millis: -1}).limit(1)
good start but caution!
ensure you set profiling back to : db.setProfilingLevel( 0, 100 )
else you can watch your disk space grow in gigabytes