aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/templates/qpi-report.j2
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-11 15:37:35 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-11 15:37:35 +0800
commit940b64dfbb9992c77d1c888719d5b30a212e8f4f (patch)
tree090fce9dd86fe3a0a81d2d768b6c64e1ea8721a2 /tests/integration/templates/qpi-report.j2
parent5bdc99ef0f7897b7ea7e62b9db733e8cbf7adaa8 (diff)
Implement a sample qpi report to show how to retrieve variables from benchmark results
Change-Id: I479e4446c18d45d69d2f88db021f7739201104d9 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'tests/integration/templates/qpi-report.j2')
-rw-r--r--tests/integration/templates/qpi-report.j218
1 files changed, 18 insertions, 0 deletions
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 %}