summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-07-29 02:49:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-29 02:49:28 +0000
commit7397f294a448223f8db31404e2d0294065f6f246 (patch)
tree0311014016932a2adfb7c2a0d90097d2d4c00494
parent355601ab1b2335550905574148b097292f214325 (diff)
parent422557ba5c56a48e14c5eea80c06efaf4e635395 (diff)
Merge "Update NSBPerf CLI to adapt to new output format"
-rwxr-xr-xyardstick/cmd/NSBperf.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/yardstick/cmd/NSBperf.py b/yardstick/cmd/NSBperf.py
index 011990a3d..4e7590ea5 100755
--- a/yardstick/cmd/NSBperf.py
+++ b/yardstick/cmd/NSBperf.py
@@ -115,10 +115,10 @@ class YardstickNSCli(object):
and generates final report in rst format.
"""
+ tc_name = os.path.splitext(test_case)[0]
report_caption = '{}\n{} ({})\n{}\n\n'.format(
'================================================================',
- 'Performance report for',
- os.path.splitext(test_case)[0].upper(),
+ 'Performance report for', tc_name.upper(),
'================================================================')
print(report_caption)
if os.path.isfile("/tmp/yardstick.out"):
@@ -127,9 +127,10 @@ class YardstickNSCli(object):
lines = jsonutils.load(infile)
if lines:
- lines = lines['result']
+ lines = \
+ lines['result']["testcases"][tc_name]["tc_data"]
tc_res = lines.pop(len(lines) - 1)
- for key, value in tc_res["benchmark"]["data"].items():
+ for key, value in tc_res["data"].items():
self.generate_kpi_results(key, value)
self.generate_nfvi_results(value)
@@ -156,7 +157,7 @@ class YardstickNSCli(object):
testcases = os.listdir(test_path + vnf)
print(("VNF :(%s)" % vnf))
print("================")
- for testcase in [tc for tc in testcases if "tc" in tc]:
+ for testcase in [tc for tc in testcases if "tc_" in tc]:
print('%s' % testcase)
print(os.linesep)
raise SystemExit(0)