diff options
Diffstat (limited to 'yardstick/benchmark/runners/arithmetic.py')
-rwxr-xr-x | yardstick/benchmark/runners/arithmetic.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py index 65fdb9d66..7ec593396 100755 --- a/yardstick/benchmark/runners/arithmetic.py +++ b/yardstick/benchmark/runners/arithmetic.py @@ -42,7 +42,7 @@ LOG = logging.getLogger(__name__) def _worker_process(queue, cls, method_name, scenario_cfg, - context_cfg, aborted): + context_cfg, aborted, output_queue): sequence = 1 @@ -108,7 +108,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": @@ -119,6 +119,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) @@ -188,5 +191,5 @@ class ArithmeticRunner(base.Runner): 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() |