diff options
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/perf.py')
-rw-r--r-- | yardstick/benchmark/scenarios/compute/perf.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/compute/perf.py b/yardstick/benchmark/scenarios/compute/perf.py index 8f1a4d630..ae4990688 100644 --- a/yardstick/benchmark/scenarios/compute/perf.py +++ b/yardstick/benchmark/scenarios/compute/perf.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 @@ -100,7 +104,7 @@ class Perf(base.Scenario): if status: raise RuntimeError(stdout) - result.update(json.loads(stdout)) + result.update(jsonutils.loads(stdout)) if "sla" in self.scenario_cfg: metric = self.scenario_cfg['sla']['metric'] @@ -140,7 +144,8 @@ def _test(): p = Perf(args, ctx) p.run(result) - print result + print(result) + if __name__ == '__main__': _test() |