diff options
author | David Hows <howsdav@gmail.com> | 2016-03-30 16:18:52 +1100 |
---|---|---|
committer | David Hows <howsdav@gmail.com> | 2016-03-30 16:18:52 +1100 |
commit | 219e5f179eb1a54a757bc77b2b5be33ef32239a2 (patch) | |
tree | 8b3d91e0d84c2d6f7612a9334cf28e6e6ea4e20a | |
parent | 04a99e3b68664e6201bcb062b6816fd6a71ef040 (diff) | |
download | mongo-219e5f179eb1a54a757bc77b2b5be33ef32239a2.tar.gz |
WT-2512 - Change how throttle values per thread are calculated
-rw-r--r-- | bench/wtperf/wtperf_throttle.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bench/wtperf/wtperf_throttle.c b/bench/wtperf/wtperf_throttle.c index bba1f629715..f9fb3a74ea0 100644 --- a/bench/wtperf/wtperf_throttle.c +++ b/bench/wtperf/wtperf_throttle.c @@ -104,10 +104,9 @@ worker_throttle(CONFIG_THREAD *thread) */ WT_RET(__wt_epoch(NULL, &throttle_cfg->last_increment)); } else { - throttle_cfg->ops_count = - (uint64_t) (float)(usecs_delta / - throttle_cfg->usecs_increment) * - (float)throttle_cfg->ops_per_increment; + throttle_cfg->ops_count = usecs_delta * + throttle_cfg->ops_per_increment / + throttle_cfg->usecs_increment; throttle_cfg->last_increment = now; } |