summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/runners/arithmetic.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/runners/arithmetic.py')
-rw-r--r--yardstick/benchmark/runners/arithmetic.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py
index bac7efb49..a3aceb35d 100644
--- a/yardstick/benchmark/runners/arithmetic.py
+++ b/yardstick/benchmark/runners/arithmetic.py
@@ -26,9 +26,6 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
sequence = 1
- benchmark = cls(context)
- method = getattr(benchmark, method_name)
-
interval = context.get("interval", 1)
arg_name = context.get('name')
stop = context.get('stop')
@@ -41,6 +38,10 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
LOG.info("worker START, step(%s, %d, %d, %d), class %s",
arg_name, start, stop, step, cls)
+ benchmark = cls(context)
+ benchmark.setup()
+ method = getattr(benchmark, method_name)
+
record_context = {"runner": context["runner"],
"host": context["host"]}
@@ -91,6 +92,7 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
if errors:
break
+ benchmark.teardown()
LOG.info("worker END")