aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark')
-rwxr-xr-xyardstick/benchmark/runners/arithmetic.py3
-rwxr-xr-xyardstick/benchmark/runners/base.py4
-rw-r--r--yardstick/benchmark/scenarios/networking/ping.py4
-rw-r--r--yardstick/benchmark/scenarios/networking/ping6.py4
4 files changed, 8 insertions, 7 deletions
diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py
index 7e516ea1e..035f9e295 100755
--- a/yardstick/benchmark/runners/arithmetic.py
+++ b/yardstick/benchmark/runners/arithmetic.py
@@ -58,7 +58,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
sla_action = scenario_cfg["sla"].get("action", "assert")
# To both be able to include the stop value and handle backwards stepping
- margin = lambda start, stop: -1 if start > stop else 1
+ def margin(start, stop):
+ return -1 if start > stop else 1
param_iters = \
[xrange(d['start'], d['stop'] + margin(d['start'], d['stop']),
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py
index 9925ace2f..56a394e1c 100755
--- a/yardstick/benchmark/runners/base.py
+++ b/yardstick/benchmark/runners/base.py
@@ -14,14 +14,14 @@ import subprocess
import time
import traceback
-log = logging.getLogger(__name__)
-
from oslo_config import cfg
import yardstick.common.utils as utils
from yardstick.benchmark.scenarios import base as base_scenario
from yardstick.dispatcher.base import Base as DispatcherBase
+log = logging.getLogger(__name__)
+
CONF = cfg.CONF
diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py
index c62c79e54..fc4176650 100644
--- a/yardstick/benchmark/scenarios/networking/ping.py
+++ b/yardstick/benchmark/scenarios/networking/ping.py
@@ -72,8 +72,8 @@ class Ping(base.Scenario):
if "sla" in self.scenario_cfg:
sla_max_rtt = int(self.scenario_cfg["sla"]["max_rtt"])
- assert result["rtt"] <= sla_max_rtt, "rtt %f > sla:max_rtt(%f); " % \
- (result["rtt"], sla_max_rtt)
+ assert result["rtt"] <= sla_max_rtt, \
+ "rtt %f > sla:max_rtt(%f); " % (result["rtt"], sla_max_rtt)
else:
LOG.error("ping '%s' '%s' timeout", options, destination)
diff --git a/yardstick/benchmark/scenarios/networking/ping6.py b/yardstick/benchmark/scenarios/networking/ping6.py
index 629f62be5..5d878eb8f 100644
--- a/yardstick/benchmark/scenarios/networking/ping6.py
+++ b/yardstick/benchmark/scenarios/networking/ping6.py
@@ -90,8 +90,8 @@ class Ping6(base.Scenario): # pragma: no cover
if "sla" in self.scenario_cfg:
sla_max_rtt = int(self.scenario_cfg["sla"]["max_rtt"])
- assert result["rtt"] <= sla_max_rtt, "rtt %f > sla:max_rtt(%f); " % \
- (result["rtt"], sla_max_rtt)
+ assert result["rtt"] <= sla_max_rtt, \
+ "rtt %f > sla:max_rtt(%f); " % (result["rtt"], sla_max_rtt)
else:
LOG.error("ping6 timeout")
self.run_done = True