aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking/netperf.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/networking/netperf.py')
-rwxr-xr-xyardstick/benchmark/scenarios/networking/netperf.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/yardstick/benchmark/scenarios/networking/netperf.py b/yardstick/benchmark/scenarios/networking/netperf.py
index 3121fdaf2..fb5497089 100755
--- a/yardstick/benchmark/scenarios/networking/netperf.py
+++ b/yardstick/benchmark/scenarios/networking/netperf.py
@@ -79,7 +79,7 @@ class Netperf(base.Scenario):
self.setup_done = True
- def run(self, args):
+ def run(self, args, result):
"""execute the benchmark"""
if not self.setup_done:
@@ -118,21 +118,20 @@ class Netperf(base.Scenario):
if status:
raise RuntimeError(stderr)
- data = json.loads(stdout)
- if data['mean_latency'] == '':
+ result.update(json.loads(stdout))
+
+ if result['mean_latency'] == '':
raise RuntimeError(stdout)
# sla check
- mean_latency = float(data['mean_latency'])
+ mean_latency = float(result['mean_latency'])
if "sla" in args:
sla_max_mean_latency = int(args["sla"]["mean_latency"])
assert mean_latency <= sla_max_mean_latency, \
- "mean_latency %f > sla_max_mean_latency(%f)" % \
+ "mean_latency %f > sla_max_mean_latency(%f); " % \
(mean_latency, sla_max_mean_latency)
- return data
-
def _test():
'''internal test function'''