diff options
author | Taseer <taseer94@gmail.com> | 2017-07-05 00:12:08 +0500 |
---|---|---|
committer | Taseer <taseer94@gmail.com> | 2017-07-06 19:16:22 +0500 |
commit | 5ad321a08cf289ca67a4a06580bb9803ca8e62e5 (patch) | |
tree | 13787847594606294ad10e46821408e324d752a6 | |
parent | 3e1069f95965d6ed2e4b346aede709a731ed4122 (diff) |
Make same workloads distinguishable for report.
Issue encountered in case of "memory" results.
JIRA: QTIP-257
Change-Id: I27ca0220e2004a0cce54c5301afca284923e52ca
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
-rw-r--r-- | qtip/cli/commands/cmd_report.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/qtip/cli/commands/cmd_report.py b/qtip/cli/commands/cmd_report.py index 1a58aa60..cca1283c 100644 --- a/qtip/cli/commands/cmd_report.py +++ b/qtip/cli/commands/cmd_report.py @@ -14,13 +14,14 @@ from prettytable import PrettyTable from qtip.reporter.console import ConsoleReporter -def extract_section(sections, section_name, node): +def extract_section(qpi, section_name, node): """ Extract information related to QPI """ - qpi = query(sections).where(lambda child: child['name'] == node) \ - .select_many(lambda child: child['sections']) \ - .where(lambda child: child['name'] == section_name) \ - .first() - return qpi + data = query(qpi).where(lambda nodes: nodes['name'] == node) \ + .select_many(lambda section: section['sections']) \ + .where(lambda section: section['name'] == section_name) \ + .first() + + return data def display_report(report, section_name, node): @@ -32,7 +33,8 @@ def display_report(report, section_name, node): for metric in section_report['metrics']: for wl in metric['workloads']: - table_workload.add_row([wl['name'], + table_workload.add_row(['{}.{}'.format(metric['name'], + wl['name']), wl['description'], wl['result'], wl['score']]) |