summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking/iperf3.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/networking/iperf3.py')
-rw-r--r--yardstick/benchmark/scenarios/networking/iperf3.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/networking/iperf3.py b/yardstick/benchmark/scenarios/networking/iperf3.py
index 334f3a920..3135af9bd 100644
--- a/yardstick/benchmark/scenarios/networking/iperf3.py
+++ b/yardstick/benchmark/scenarios/networking/iperf3.py
@@ -19,6 +19,7 @@ import pkg_resources
from oslo_serialization import jsonutils
import yardstick.ssh as ssh
+from yardstick.common import utils
from yardstick.benchmark.scenarios import base
LOG = logging.getLogger(__name__)
@@ -131,8 +132,8 @@ For more info see http://software.es.net/iperf
# Note: convert all ints to floats in order to avoid
# schema conflicts in influxdb. We probably should add
# a format func in the future.
- result.update(
- jsonutils.loads(stdout, parse_int=float))
+ iperf_result = jsonutils.loads(stdout, parse_int=float)
+ result.update(utils.flatten_dict_key(iperf_result))
if "sla" in self.scenario_cfg:
sla_iperf = self.scenario_cfg["sla"]
@@ -141,7 +142,7 @@ For more info see http://software.es.net/iperf
# convert bits per second to bytes per second
bit_per_second = \
- int(result["end"]["sum_received"]["bits_per_second"])
+ int(iperf_result["end"]["sum_received"]["bits_per_second"])
bytes_per_second = bit_per_second / 8
assert bytes_per_second >= sla_bytes_per_second, \
"bytes_per_second %d < sla:bytes_per_second (%d); " % \
@@ -149,7 +150,7 @@ For more info see http://software.es.net/iperf
else:
sla_jitter = float(sla_iperf["jitter"])
- jitter_ms = float(result["end"]["sum"]["jitter_ms"])
+ jitter_ms = float(iperf_result["end"]["sum"]["jitter_ms"])
assert jitter_ms <= sla_jitter, \
"jitter_ms %f > sla:jitter %f; " % \
(jitter_ms, sla_jitter)