summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_libs/fsm.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency/fsm_libs/fsm.js')
-rw-r--r--jstests/concurrency/fsm_libs/fsm.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/concurrency/fsm_libs/fsm.js b/jstests/concurrency/fsm_libs/fsm.js
index be9473c2684..0a3e4a45bf4 100644
--- a/jstests/concurrency/fsm_libs/fsm.js
+++ b/jstests/concurrency/fsm_libs/fsm.js
@@ -31,10 +31,8 @@ var fsm = (function() {
var shardNames = Object.keys(args.cluster.shards);
-
- shardNames.forEach(name =>
- (connCache.shards[name] = args.cluster.shards[name].map(connStr =>
- new Mongo(connStr))));
+ shardNames.forEach(name => (connCache.shards[name] = args.cluster.shards[name].map(
+ connStr => new Mongo(connStr))));
}
for (var i = 0; i < args.iterations; ++i) {
@@ -67,7 +65,9 @@ var fsm = (function() {
// weights = [ 0.25, 0.5, 0.25 ]
// => accumulated = [ 0.25, 0.75, 1 ]
- var weights = states.map(function(k) { return doc[k]; });
+ var weights = states.map(function(k) {
+ return doc[k];
+ });
var accumulated = [];
var sum = weights.reduce(function(a, b, i) {
@@ -76,7 +76,7 @@ var fsm = (function() {
}, 0);
// Scale the random value by the sum of the weights
- randVal *= sum; // ~ U[0, sum)
+ randVal *= sum; // ~ U[0, sum)
// Find the state corresponding to randVal
for (var i = 0; i < accumulated.length; ++i) {