aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/runners/duration.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/runners/duration.py')
-rw-r--r--yardstick/benchmark/runners/duration.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py
index 75942766d..2cb2600c8 100644
--- a/yardstick/benchmark/runners/duration.py
+++ b/yardstick/benchmark/runners/duration.py
@@ -31,6 +31,9 @@ from yardstick.benchmark.runners import base
LOG = logging.getLogger(__name__)
+QUEUE_PUT_TIMEOUT = 10
+
+
def _worker_process(queue, cls, method_name, scenario_cfg,
context_cfg, aborted, output_queue):
@@ -79,7 +82,9 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
LOG.exception("")
else:
if result:
- output_queue.put(result)
+ # add timeout for put so we don't block test
+ # if we do timeout we don't care about dropping individual KPIs
+ output_queue.put(result, True, QUEUE_PUT_TIMEOUT)
time.sleep(interval)
@@ -90,7 +95,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
'errors': errors
}
- queue.put(benchmark_output)
+ queue.put(benchmark_output, True, QUEUE_PUT_TIMEOUT)
LOG.debug("runner=%(runner)s seq=%(sequence)s END",
{"runner": runner_cfg["runner_id"], "sequence": sequence})