diff options
author | Judah Schvimer <judah@mongodb.com> | 2015-11-05 14:40:37 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2015-11-05 14:40:37 -0500 |
commit | fef65b69202c850fd05cd22b94351688e4785188 (patch) | |
tree | 19a74a00c0939405bf6e17ae64960781b0886d8c /jstests/concurrency/fsm_libs/thread_mgr.js | |
parent | e2cbe3c873fa2f989e5c2b811b1757ac0f2095e3 (diff) | |
download | mongo-fef65b69202c850fd05cd22b94351688e4785188.tar.gz |
SERVER-20937 Add mode to FSM framework that drives greater load on the system
Diffstat (limited to 'jstests/concurrency/fsm_libs/thread_mgr.js')
-rw-r--r-- | jstests/concurrency/fsm_libs/thread_mgr.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/jstests/concurrency/fsm_libs/thread_mgr.js b/jstests/concurrency/fsm_libs/thread_mgr.js index 86737a1a11d..d9e4e66b50f 100644 --- a/jstests/concurrency/fsm_libs/thread_mgr.js +++ b/jstests/concurrency/fsm_libs/thread_mgr.js @@ -7,9 +7,9 @@ load('jstests/concurrency/fsm_libs/worker_thread.js'); // for workerThread * Helper for spawning and joining worker threads. */ -var ThreadManager = function(clusterOptions, executionMode) { +var ThreadManager = function(clusterOptions, executionMode, executionOptions) { if (!(this instanceof ThreadManager)) { - return new ThreadManager(clusterOptions, executionMode); + return new ThreadManager(clusterOptions, executionMode, executionOptions); } function makeThread(workloads, args, options) { @@ -59,7 +59,7 @@ var ThreadManager = function(clusterOptions, executionMode) { workloads.forEach(function(workload) { var config = context[workload].config; - threadCounts[workload] = config.threadCount; + threadCounts[workload] = config.threadCount * executionOptions.threadMultiplier; }); var requestedNumThreads = computeNumThreads(); @@ -106,8 +106,6 @@ var ThreadManager = function(clusterOptions, executionMode) { workloads = _workloads; // worker thread needs to load all workloads } - var config = _context[workload].config; - for (var i = 0; i < threadCounts[workload]; ++i) { var args = { tid: tid++, @@ -118,6 +116,7 @@ var ThreadManager = function(clusterOptions, executionMode) { collName: _context[workload].collName, cluster: cluster.getSerializedCluster(), clusterOptions: clusterOptions, + iterationMultiplier: executionOptions.iterationMultiplier, seed: Random.randInt(1e13), // contains range of Date.getTime() globalAssertLevel: globalAssertLevel }; |