From 940b64dfbb9992c77d1c888719d5b30a212e8f4f Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Tue, 11 Apr 2017 15:37:35 +0800 Subject: Implement a sample qpi report to show how to retrieve variables from benchmark results Change-Id: I479e4446c18d45d69d2f88db021f7739201104d9 Signed-off-by: Yujun Zhang --- tests/integration/templates/qpi-report.j2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/integration/templates/qpi-report.j2 (limited to 'tests/integration/templates/qpi-report.j2') diff --git a/tests/integration/templates/qpi-report.j2 b/tests/integration/templates/qpi-report.j2 new file mode 100644 index 00000000..afe9bfb8 --- /dev/null +++ b/tests/integration/templates/qpi-report.j2 @@ -0,0 +1,18 @@ +Sample QPI Report +{% for host in groups['compute'] %} +{% set qpi_result = hostvars[host].qpi_result %} + +Host: {{ hostvars[host].ansible_hostname }} +QPI: {{ qpi_result.score }} +Spec: {{ qpi_result.spec.name }} + +{% for section in qpi_result.section_results %} +- {{ section.name }}: {{ section.result.score }} +{% for metric in section.result.metric_results %} + - {{ metric.name }}: {{ metric.result.score }} +{% for workload in metric.result.workload_results %} + - {{ workload.name }}: {{ workload.score }} +{% endfor %} +{% endfor %} +{% endfor %} +{% endfor %} -- cgit 1.2.3-korg