Created
July 22, 2014 12:04
-
-
Save digitalwm/062b4b24773453bc785d to your computer and use it in GitHub Desktop.
Load test a mongoDB instalation
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.foo.insert( { _id : 1 } ) | |
ops = [{ op : "findOne" , ns : "test.foo" , query : { _id : 1 } }, { op : "update" , ns : "test.foo" , query : { _id : 1 } , update : { $inc : { x : 1 } } } ] | |
for ( x = 1; x<=128; x*=2){ | |
res = benchRun( { parallel : x , | |
seconds : 5 , | |
ops : ops | |
} ) | |
print( "threads: " + x + "\t queries/sec: " + res.query ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment