diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-01-01 16:42:43 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-01-01 16:42:43 -0500 |
commit | 23a02cffe69cccd4fb9911dec350c0f5c5b8dd10 (patch) | |
tree | 45eb218bae8e623848c9309f1b758bce9c9d2ec4 /jstests/parallel | |
parent | 5860ed9463e9275cda4e50008be6d83ec849b560 (diff) | |
download | mongo-23a02cffe69cccd4fb9911dec350c0f5c5b8dd10.tar.gz |
use fewer threads on manyclients.js if system can't handle
Diffstat (limited to 'jstests/parallel')
-rw-r--r-- | jstests/parallel/manyclients.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/jstests/parallel/manyclients.js b/jstests/parallel/manyclients.js index 14cdec57ef6..1ad94fa29ab 100644 --- a/jstests/parallel/manyclients.js +++ b/jstests/parallel/manyclients.js @@ -8,11 +8,17 @@ Random.setRandomSeed(); t = new ParallelTester(); -for( id = 0; id < 200; ++id ) { +numThreads = 200; +if ( db.adminCommand( "buildInfo" ).bits < 64 ) + numThreads = 50; +numThreads = Math.min( numThreads, db.serverStatus().connections.available / 3 ); +print( "numThreads: " + numThreads ); + +for( id = 0; id < numThreads; ++id ) { var g = new EventGenerator( id, "jstests_parallel_manyclients", Random.randInt( 20 ) ); for( j = 0; j < 1000; ++j ) { if ( j % 50 == 0 ) { - g.addCheckCount( j, {who:id}, true ); + g.addCheckCount( j, {who:id}, false ); } g.addInsert( { i:j, who:id } ); } |