X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Frunners%2Farithmetic.py;h=f73d1cd0c432e9b2b48b9e7268b36892ff190314;hb=120cf2893a4cc8871dc55c56ce019301f55cad3d;hp=a3aceb35d5d04a6b6b5f55faee7d9c6b684552a3;hpb=d290591a6f53d74ed00fe49e93654be5c486e998;p=yardstick.git diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py old mode 100644 new mode 100755 index a3aceb35d..f73d1cd0c --- a/yardstick/benchmark/runners/arithmetic.py +++ b/yardstick/benchmark/runners/arithmetic.py @@ -48,8 +48,9 @@ def _worker_process(queue, cls, method_name, context, scenario_args): 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 @@ -97,6 +98,30 @@ def _worker_process(queue, cls, method_name, context, scenario_args): 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'