|
This benchRun command is designed as a QA baseline perf measurement tool, not designed to be a "benchmark". CODE: db.foo.drop();
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 )
}
Dynamic values
res = benchRun( { ops : [ { ns : t.getFullName() ,
op : "update" ,
query : { _id : { "#RAND_INT" : [ 0 , 100 ] } } ,
update : { $inc : { x : 1 } } } ] ,
parallel : 2 ,
seconds : 1 ,
totals : true } )
More info: http://github.com/mongodb/mongo/commit/3db3cb13dc1c522db8b59745d6c74b0967f1611c |

PLEASE POST QUESTIONS IN THE USER GROUPS FORUM. Post non-question comments and helpful hints here.
blog comments powered by Disqus