Skip to content

Instantly share code, notes, and snippets.

@kaliaparijat
Created March 24, 2014 05:55
Show Gist options
  • Save kaliaparijat/9734877 to your computer and use it in GitHub Desktop.
Save kaliaparijat/9734877 to your computer and use it in GitHub Desktop.
db.results.aggregate([
{
$match: {
$and:[
{
"profile.Zend_Http_Client_Adapter_Socket::read==>fgets": {
"$exists": true }
},
{
"profile.main().wt": {
$lte: 10000000 }
}
]
}
},
{
$group: {
"_id": null,
"count":{$sum:1},
"fgetsAvg": {
$avg: "$profile.Zend_Http_Client_Adapter_Socket::read==>fgets.wt"
},
"mainAvg" :{
$avg: "$profile.main().wt"
},
}
}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment