From fc8415b0a8df8aaa640d7eb2bfd2bb24e696a407 Mon Sep 17 00:00:00 2001 From: Oleh Anufriiev Date: Thu, 13 Aug 2015 16:31:42 +0300 Subject: [PATCH] RPS thread start pause correction Correct calculation of pause between starting threads inside processes Change-Id: Ibfba44987886a1fd6e29064e6a7c65592e95d871 Closes-Bug: #1484537 --- rally/plugins/common/runners/rps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rally/plugins/common/runners/rps.py b/rally/plugins/common/runners/rps.py index 2dcaee1412..0f2cf6d271 100644 --- a/rally/plugins/common/runners/rps.py +++ b/rally/plugins/common/runners/rps.py @@ -51,7 +51,6 @@ def _worker_process(queue, iteration_gen, timeout, rps, times, """ pool = collections.deque() - start = time.time() sleep = 1.0 / rps runner._log_worker_info(times=times, rps=rps, timeout=timeout, @@ -60,6 +59,8 @@ def _worker_process(queue, iteration_gen, timeout, rps, times, time.sleep( (sleep * info["processes_counter"]) / info["processes_to_start"]) + start = time.time() + i = 0 while i < times and not aborted.is_set(): scenario_context = runner._get_scenario_context(context)