Skip to content

Instantly share code, notes, and snippets.

@allenyang79
Last active November 2, 2017 02:25
Show Gist options
  • Save allenyang79/6b09dd0fb2b98e7dab7c7b2fb91f98bf to your computer and use it in GitHub Desktop.
Save allenyang79/6b09dd0fb2b98e7dab7c7b2fb91f98bf to your computer and use it in GitHub Desktop.
keep mongod busy #mongo
db.monitoringTest.drop()
while(true) {
for(i = 0; i < 1000 ; i++) {
db.monitoringTest.insert({'i':i})
}
for(i = 0; i < 1000 ; i++) {
db.monitoringTest.update({'i':i}, {$set:{'text':'text'}})
}
cursor = db.monitoringTest.find()
while(cursor.hasNext()) {
c = cursor.next()
}
for(i = 0; i < 1000 ; i++) {
db.monitoringTest.remove({'i':i})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment