diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2014-03-25 15:29:54 -0400 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2014-03-25 18:34:49 -0400 |
commit | 57f97f213346b7a0305c81fd70894a77ca35a886 (patch) | |
tree | 2298ebe1b7cb4a6faaa7e2e06ccd9a098b661acf /jstests/bench_test2.js | |
parent | e73399e0e696aaaf1e859533e10cc2b74d46994f (diff) | |
download | mongo-57f97f213346b7a0305c81fd70894a77ca35a886.tar.gz |
SERVER-13297: remove dead jstests
Diffstat (limited to 'jstests/bench_test2.js')
-rw-r--r-- | jstests/bench_test2.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/jstests/bench_test2.js b/jstests/bench_test2.js deleted file mode 100644 index e2057ac693e..00000000000 --- a/jstests/bench_test2.js +++ /dev/null @@ -1,49 +0,0 @@ - -t = db.bench_test2 -t.drop(); - -for ( i=0; i<100; i++ ) - t.insert( { _id : i , x : 0 } ); -db.getLastError(); - -benchArgs = { ops : [ { ns : t.getFullName() , - op : "update" , - query : { _id : { "#RAND_INT" : [ 0 , 100 ] } } , - update : { $inc : { x : 1 } } } ] , - parallel : 2 , - seconds : 1 , - totals : true , - host : db.getMongo().host } - -if (jsTest.options().auth) { - benchArgs['db'] = 'admin'; - benchArgs['username'] = jsTest.options().adminUser; - benchArgs['password'] = jsTest.options().adminPassword; -} - -res = benchRun( benchArgs ) -printjson( res ); - -sumsq = 0 -sum = 0 - -min = 1000 -max = 0; -t.find().forEach( - function(z){ - sum += z.x; - sumsq += Math.pow( ( res.update / 100 ) - z.x , 2 ); - min = Math.min( z.x , min ); - max = Math.max( z.x , max ); - } -) - -avg = sum / 100 -std = Math.sqrt( sumsq / 100 ) - -print( "Avg: " + avg ) -print( "Std: " + std ) -print( "Min: " + min ) -print( "Max: " + max ) - - |