summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-06-08 04:01:11 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-08 04:01:12 +0000
commit8b4dba01fef62959dee8493808c37074ba0fef8c (patch)
treea2f4a89a95aac7158e8c6c24952e0d36087f4643
parentf42719d1347b60bf7d99226221f3a5b51a3b0a25 (diff)
parent5d2dac75c61714cdce7502bd8a4ee29459d6a382 (diff)
Merge "Update plotter.py to new yardstick.out format"
-rw-r--r--yardstick/plot/plotter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/yardstick/plot/plotter.py b/yardstick/plot/plotter.py
index 91dd521f7..4cbbdfe74 100644
--- a/yardstick/plot/plotter.py
+++ b/yardstick/plot/plotter.py
@@ -36,6 +36,7 @@ class Parser(object):
'fio': []
}
self.default_input_loc = "/tmp/yardstick.out"
+ self.scenarios = {}
def _get_parser(self):
'''get a command-line parser'''
@@ -59,7 +60,11 @@ class Parser(object):
def _add_record(self, record):
'''add record to the relevant scenario'''
- runner_object = record['sargs']['runner']['object']
+ if "runner_id" in record and "benchmark" not in record:
+ obj_name = record["scenario_cfg"]["runner"]["object"]
+ self.scenarios[record["runner_id"]] = obj_name
+ return
+ runner_object = self.scenarios[record["runner_id"]]
for test_type in self.data.keys():
if test_type in runner_object:
self.data[test_type].append(record)