From: kbbrodz Date: Fri, 13 May 2016 13:42:38 +0000 (+0200) Subject: Update plotter.py to new yardstick.out format X-Git-Tag: colorado.1.0~153^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=5d2dac75c61714cdce7502bd8a4ee29459d6a382;p=yardstick.git Update plotter.py to new yardstick.out format JIRA: YARDSTICK-176 Change-Id: I16ae136700334e95a1edcda6a46208ca21c19951 Signed-off-by: kbbrodz --- 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)