Last active
November 2, 2017 02:25
-
-
Save allenyang79/6b09dd0fb2b98e7dab7c7b2fb91f98bf to your computer and use it in GitHub Desktop.
keep mongod busy #mongo
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.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