From 5ad321a08cf289ca67a4a06580bb9803ca8e62e5 Mon Sep 17 00:00:00 2001 From: Taseer Date: Wed, 5 Jul 2017 00:12:08 +0500 Subject: Make same workloads distinguishable for report. Issue encountered in case of "memory" results. JIRA: QTIP-257 Change-Id: I27ca0220e2004a0cce54c5301afca284923e52ca Signed-off-by: Taseer Ahmed --- qtip/cli/commands/cmd_report.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'qtip') 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']]) -- cgit 1.2.3-korg