diff options
Diffstat (limited to 'yardstick/benchmark/scenarios/networking/netperf.py')
-rwxr-xr-x | yardstick/benchmark/scenarios/networking/netperf.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/networking/netperf.py b/yardstick/benchmark/scenarios/networking/netperf.py index 28f5bea56..80dbed334 100755 --- a/yardstick/benchmark/scenarios/networking/netperf.py +++ b/yardstick/benchmark/scenarios/networking/netperf.py @@ -7,9 +7,13 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## # bulk data test and req/rsp test are supported -import pkg_resources +from __future__ import absolute_import +from __future__ import print_function + import logging -import json + +import pkg_resources +from oslo_serialization import jsonutils import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base @@ -129,7 +133,7 @@ class Netperf(base.Scenario): if status: raise RuntimeError(stderr) - result.update(json.loads(stdout)) + result.update(jsonutils.loads(stdout)) if result['mean_latency'] == '': raise RuntimeError(stdout) @@ -175,7 +179,7 @@ def _test(): netperf = Netperf(args, ctx) netperf.run(result) - print result + print(result) if __name__ == '__main__': |