summaryrefslogtreecommitdiffstats
path: root/qtip/cli/commands/cmd_report.py
diff options
context:
space:
mode:
Diffstat (limited to 'qtip/cli/commands/cmd_report.py')
-rw-r--r--qtip/cli/commands/cmd_report.py16
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']])