summaryrefslogtreecommitdiffstats
path: root/qtip/reporter/templates
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-03-09 12:05:46 +0500
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-03-21 09:09:10 +0000
commit19dd4962baca5d7103fe0de55d415e175dbe35e4 (patch)
treeab416a88be6066a0faefbf6f3d86f0a9d05a3044 /qtip/reporter/templates
parent695a881515c40e29fc12eb5003e0f3682bc4d64b (diff)
Refactor reporter module
- Create templates for report format specific to each metric. - Outputs the details of the specified metric across all the nodes in cluster. - Timeline to be covered in a separate patch JIRA: QTIP-199 Change-Id: Ic83749725b0c9cc5bd9a7f24f21b2cd113abe0e1 Signed-off-by: Taseer Ahmed <taseer94@gmail.com> (cherry picked from commit 04e50e57819bdf40a2fd7abdd3fc7be798771e0b)
Diffstat (limited to 'qtip/reporter/templates')
-rw-r--r--qtip/reporter/templates/base.j226
-rw-r--r--qtip/reporter/templates/dpi.j25
-rw-r--r--qtip/reporter/templates/ramspeed.j213
-rw-r--r--qtip/reporter/templates/report.j222
-rw-r--r--qtip/reporter/templates/ssl.j221
-rw-r--r--qtip/reporter/templates/timeline.j24
-rw-r--r--qtip/reporter/templates/unixbench.j210
7 files changed, 77 insertions, 24 deletions
diff --git a/qtip/reporter/templates/base.j2 b/qtip/reporter/templates/base.j2
new file mode 100644
index 00000000..26697175
--- /dev/null
+++ b/qtip/reporter/templates/base.j2
@@ -0,0 +1,26 @@
+Plan Name: {{ plan_name }}
+Start Time: {{ start_time }}
+Stop Time: {{ stop_time }}
+{%- for sys in sut -%}
+{% for qpi in sys.qpis %}
+{% for bm in qpi.benchmarks %}
+{%- if bm.name == metric_name -%}
+{%- if metric_name == 'dhrystone' or metric_name == 'whetstone' -%}
+{# TODO (taseer) remove hardcoded material #}
+{% include 'unixbench.j2' %}
+{% else %}
+{% include '%s.j2' % metric_name %}
+{%- endif -%}
+
+System Information:
+ CPU Brand: {{ bm.sysinfo.cpu }}
+ Disk: {{ bm.sysinfo.disk }}
+ Host Name: {{ bm.sysinfo.hostname }}
+ Kernel: {{ bm.sysinfo.kernel }}
+ Memory: {{ bm.sysinfo.memory }}
+ Operating System: {{ bm.sysinfo.os }}
+ Product: {{ bm.sysinfo.product }}
+{%- endif -%}
+{%- endfor -%}
+{%- endfor -%}
+{%- endfor -%} \ No newline at end of file
diff --git a/qtip/reporter/templates/dpi.j2 b/qtip/reporter/templates/dpi.j2
new file mode 100644
index 00000000..758a821e
--- /dev/null
+++ b/qtip/reporter/templates/dpi.j2
@@ -0,0 +1,5 @@
+Benchmark: {{ bm.name }}
+CPU Usage: {{ bm. cpu_usage }}
+Results:
+ Bits per Second: {{ bm.results.bps }}
+ Packets per Second: {{ bm.results.pps }} \ No newline at end of file
diff --git a/qtip/reporter/templates/ramspeed.j2 b/qtip/reporter/templates/ramspeed.j2
new file mode 100644
index 00000000..d08d7e2e
--- /dev/null
+++ b/qtip/reporter/templates/ramspeed.j2
@@ -0,0 +1,13 @@
+Benchmark: {{ bm.name }}
+CPU Usage: {{ bm. cpu_usage }}
+Results:
+ Float Addition: {{ bm.results.float_add }}
+ Float Average: {{ bm.results.float_average }}
+ Float Copy: {{ bm.results.float_copy }}
+ Float Scale: {{ bm.results.float_scale }}
+ Float Triad: {{ bm.results.float_triad }}
+ Integer Addition: {{ bm.results.integer_add }}
+ Integer Average: {{ bm.results.integer_average }}
+ Integer Copy: {{ bm.results.integer_copy}}
+ Integer Scale: {{ bm.results.integer_scale }}
+ Integer Triad: {{ bm.results.integer_triad}} \ No newline at end of file
diff --git a/qtip/reporter/templates/report.j2 b/qtip/reporter/templates/report.j2
deleted file mode 100644
index 766e6dde..00000000
--- a/qtip/reporter/templates/report.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-{{ title }}
-
-Plan: {{ plan.name }}
-
-{{ qpi.name }}: {{ qpi.score }}
-Sections:
-{% for section in sections %}
- {{ section.name }}: {{ section.score }}
-
- Formula: {{ section.formula }}
- Metrics:
- {% for metric in section.metrics %}
- {{ metric.name }}: {{ metric.score }}
- Formula: {{ metric.formula }}
- Workloads:
- {% for workload in workloads %}
- {{ workload.name }}: {{ workload.score }}
- {% endfor %}
- {% endfor %}
-{% endfor %}
-
-{{ signature }}
diff --git a/qtip/reporter/templates/ssl.j2 b/qtip/reporter/templates/ssl.j2
new file mode 100644
index 00000000..b46927a8
--- /dev/null
+++ b/qtip/reporter/templates/ssl.j2
@@ -0,0 +1,21 @@
+Benchmark: {{ bm.name }}
+CPU Usage: {{ bm.cpu_usage }}
+Results:
+ AES 128 CBC (bytes):
+ 16: {{ bm.results.aes_128_cbc_16_bytes }}
+ 64: {{ bm.results.aes_128_cbc_64_bytes }}
+ 256: {{ bm.results.aes_128_cbc_256_bytes }}
+ 1024: {{ bm.results.aes_128_cbc_1024_bytes }}
+ 8192: {{ bm.results.aes_128_cbc_8192_bytes }}
+
+ RSA SIGN:
+ 512: {{ bm.results.rsa_sign_512 }}
+ 1024: {{ bm.results.rsa_sign_1024 }}
+ 2048: {{ bm.results.rsa_sign_2048 }}
+ 4096: {{ bm.results.rsa_sign_4096 }}
+
+ RSA VERIFY:
+ 512: {{ bm.results.rsa_verify_512 }}
+ 1024: {{ bm.results.rsa_verify_1024 }}
+ 2048: {{ bm.results.rsa_verify_2048 }}
+ 4096: {{ bm.results.rsa_verify_4096 }} \ No newline at end of file
diff --git a/qtip/reporter/templates/timeline.j2 b/qtip/reporter/templates/timeline.j2
index d4c95c46..ccb089e0 100644
--- a/qtip/reporter/templates/timeline.j2
+++ b/qtip/reporter/templates/timeline.j2
@@ -1,8 +1,8 @@
{{ title }}
{% for phase in phases %}
-{{ phase.name|upper }}{{ "TIME" }}
+{{ phase.name|upper }}{{ "TIME"}}
{% for cp in phase.checkpoints %}
-{{ cp.name }}{{ cp.timestamp}}
+{{ cp.name }}{{ cp.timestamp| indent(15, True)}}
{% endfor %}
{% endfor %}
Total: {{ total }}
diff --git a/qtip/reporter/templates/unixbench.j2 b/qtip/reporter/templates/unixbench.j2
new file mode 100644
index 00000000..69006da7
--- /dev/null
+++ b/qtip/reporter/templates/unixbench.j2
@@ -0,0 +1,10 @@
+Benchmark: {{ bm.name }}
+CPU Usage: {{ bm. cpu_usage }}
+Results:
+ Multi CPU:
+ Number: {{ bm.results.multi_cpus.num }}
+ Score: {{ bm.results.multi_cpus.score }}
+ Single CPU:
+ Number: {{ bm.results.single_cpu.num }}
+ Score: {{ bm.results.single_cpu.num }}
+ Total CPUs: {{ bm.results.total_cpus }} \ No newline at end of file