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, 6 insertions, 3 deletions
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py
index 772983cfd..2bf2cd2fe 100644
--- a/yardstick/benchmark/runners/duration.py
+++ b/yardstick/benchmark/runners/duration.py
@@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
def _worker_process(queue, cls, method_name, scenario_cfg,
- context_cfg, aborted):
+ context_cfg, aborted, output_queue):
sequence = 1
@@ -66,7 +66,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
errors = ""
try:
- method(data)
+ result = method(data)
except AssertionError as assertion:
# SLA validation failed in scenario, determine what to do now
if sla_action == "assert":
@@ -77,6 +77,9 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
except Exception as e:
errors = traceback.format_exc()
LOG.exception(e)
+ else:
+ if result:
+ output_queue.put(result)
time.sleep(interval)
@@ -126,5 +129,5 @@ If the scenario ends before the time has elapsed, it will be started again.
self.process = multiprocessing.Process(
target=_worker_process,
args=(self.result_queue, cls, method, scenario_cfg,
- context_cfg, self.aborted))
+ context_cfg, self.aborted, self.output_queue))
self.process.start()