RPS thread start pause correction

Correct calculation of pause between starting threads
inside processes

Change-Id: Ibfba44987886a1fd6e29064e6a7c65592e95d871
Closes-Bug: #1484537
This commit is contained in:
Oleh Anufriiev 2015-08-13 16:31:42 +03:00
parent 97a07cda3a
commit fc8415b0a8

View File

@ -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)