sequence = 1
- benchmark = cls(context)
- method = getattr(benchmark, method_name)
-
interval = context.get("interval", 1)
arg_name = context.get('name')
stop = context.get('stop')
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"]}
sla_action = None
if "sla" in scenario_args:
sla_action = scenario_args["sla"].get("action", "assert")
+ margin = 1 if step > 0 else -1
- for value in range(start, stop, step):
+ for value in range(start, stop+margin, step):
options[arg_name] = value
if errors:
break
+ benchmark.teardown()
LOG.info("worker END")
class ArithmeticRunner(base.Runner):
+ '''Run a scenario arithmetically stepping an input value
+
+ Parameters
+ interval - time to wait between each scenario invocation
+ type: int
+ unit: seconds
+ default: 1 sec
+ name - name of scenario option that will be increased for each invocation
+ type: string
+ unit: na
+ default: none
+ start - value to use in first invocation of scenario
+ type: int
+ unit: na
+ default: none
+ step - value added to start value in next invocation of scenario
+ type: int
+ unit: na
+ default: none
+ stop - value indicating end of invocation
+ type: int
+ unit: na
+ default: none
+ '''
__execution_type__ = 'Arithmetic'