aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/compute/lmbench.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/lmbench.py')
-rw-r--r--yardstick/benchmark/scenarios/compute/lmbench.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/yardstick/benchmark/scenarios/compute/lmbench.py b/yardstick/benchmark/scenarios/compute/lmbench.py
index 518840c09..6a17ae8a1 100644
--- a/yardstick/benchmark/scenarios/compute/lmbench.py
+++ b/yardstick/benchmark/scenarios/compute/lmbench.py
@@ -6,9 +6,13 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-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
@@ -130,9 +134,10 @@ class Lmbench(base.Scenario):
raise RuntimeError(stderr)
if test_type == 'latency':
- result.update({"latencies": json.loads(stdout)})
+ result.update(
+ {"latencies": jsonutils.loads(stdout)})
else:
- result.update(json.loads(stdout))
+ result.update(jsonutils.loads(stdout))
if "sla" in self.scenario_cfg:
sla_error = ""
@@ -185,7 +190,8 @@ def _test():
p = Lmbench(args, ctx)
p.run(result)
- print result
+ print(result)
+
if __name__ == '__main__':
_test()