aboutsummaryrefslogtreecommitdiffstats
path: root/resources/roles/ramspeed
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-20 22:51:59 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-21 13:43:50 +0800
commit6144eac326d14e26bbb849abea51c4cf7f3881b6 (patch)
tree15ab6fcd3eadfb6d9ae7d089b237a2f0416a9235 /resources/roles/ramspeed
parent7273ca98a91399e188af15e192be93724977fe08 (diff)
Group test results and report under node
Change-Id: I66286787d06c5012c6dcf516cffb9f6fd76522c5 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/roles/ramspeed')
-rw-r--r--resources/roles/ramspeed/tasks/main.yml24
-rw-r--r--resources/roles/ramspeed/templates/memory-metrics.j216
2 files changed, 28 insertions, 12 deletions
diff --git a/resources/roles/ramspeed/tasks/main.yml b/resources/roles/ramspeed/tasks/main.yml
index 6473d576..73df35de 100644
--- a/resources/roles/ramspeed/tasks/main.yml
+++ b/resources/roles/ramspeed/tasks/main.yml
@@ -45,11 +45,11 @@
collect:
string: "{{ ramsmp_intmem_out.stdout }}"
patterns:
- - '^INTEGER\s+BatchRun\s+Copy:\s+?(?P<integer_copy>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Scale:\s+?(?P<integer_scale>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Add:\s+?(?P<integer_add>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Triad:\s+?(?P<integer_triad>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+AVERAGE:\s+?(?P<integer_average>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Copy:\s+?(?P<copy>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Scale:\s+?(?P<scale>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Add:\s+?(?P<add>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Triad:\s+?(?P<triad>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+AVERAGE:\s+?(?P<average>\d+\.\d+)\sMB/s$'
dump: 'ramsmp-intmem.log'
register: intmem_metrics
tags: [collect]
@@ -58,18 +58,18 @@
collect:
string: "{{ ramsmp_floatmem_out.stdout }}"
patterns:
- - '^FL-POINT\s+BatchRun\s+Copy:\s+?(?P<float_copy>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Scale:\s+?(?P<float_scale>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Add:\s+?(?P<float_add>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Triad:\s+?(?P<float_triad>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+AVERAGE:\s+?(?P<float_average>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Copy:\s+?(?P<copy>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Scale:\s+?(?P<scale>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Add:\s+?(?P<add>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Triad:\s+?(?P<triad>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+AVERAGE:\s+?(?P<average>\d+\.\d+)\sMB/s$'
dump: 'ramsmp-floatmem.log'
register: floatmem_metrics
tags: [collect]
- name: create memory metrics report
template:
- src: "{{ qtip_resources }}/template/mem-metrics.j2"
- dest: "{{ qtip_reports }}/mem-metrics"
+ src: "memory-metrics.j2"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/memory-metrics"
delegate_to: localhost
tags: [report]
diff --git a/resources/roles/ramspeed/templates/memory-metrics.j2 b/resources/roles/ramspeed/templates/memory-metrics.j2
new file mode 100644
index 00000000..4f5a8e80
--- /dev/null
+++ b/resources/roles/ramspeed/templates/memory-metrics.j2
@@ -0,0 +1,16 @@
+Memory
+======
+
+INTEGER
+^^^^^^^
+{{ ('Copy', intmem_metrics['copy'][0])|justify }}
+{{ ('Scale', intmem_metrics['scale'][0])|justify }}
+{{ ('Add', intmem_metrics['add'][0])|justify }}
+{{ ('Triad', intmem_metrics['triad'][0])|justify }}
+
+FL-POINT
+^^^^^^^^
+{{ ('Copy', floatmem_metrics['copy'][0])|justify }}
+{{ ('Scale', floatmem_metrics['copy'][0])|justify }}
+{{ ('Add', floatmem_metrics['copy'][0])|justify }}
+{{ ('Triad', floatmem_metrics['copy'][0])|justify }}