diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-18 20:58:10 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-19 11:48:32 +0800 |
commit | 759410e4d9feafc1cff66a47e21227e55c04b4cb (patch) | |
tree | 6d88aa06eccead43678c05dd465c9a1e41651708 | |
parent | cf4a1fc9562e0c7d205da5b4dc79824e53f1d304 (diff) |
Create ramspeed report
Change-Id: I60805e83a9256fb8fdca362478551c2a5a3106dc
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r-- | resources/metric/ramspeed.yaml | 18 | ||||
-rw-r--r-- | resources/template/mem-metrics.j2 | 24 |
2 files changed, 40 insertions, 2 deletions
diff --git a/resources/metric/ramspeed.yaml b/resources/metric/ramspeed.yaml index b25485cf..6473d576 100644 --- a/resources/metric/ramspeed.yaml +++ b/resources/metric/ramspeed.yaml @@ -11,30 +11,35 @@ file: path: "{{ cwd }}" state: directory + tags: [setup] - name: download ramspeed/ramsmp unarchive: src: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz dest: "{{ cwd }}" remote_src: yes + tags: [setup] - name: build ramsmp command: ./build.sh args: chdir: "{{ cwd }}/ramsmp-3.5.0" creates: ramsmp + tags: [setup] - name: intmem benchmarking command: ./ramsmp -b 3 -l 5 -p 1 args: chdir: "{{ cwd }}/ramsmp-3.5.0" register: ramsmp_intmem_out + tags: [run] - name: floatmem benchmarking command: ./ramsmp -b 6 -l 5 -p 1 args: chdir: "{{ cwd }}/ramsmp-3.5.0" register: ramsmp_floatmem_out + tags: [run] - name: collect integer memory metrics from ramspeed collect: @@ -46,7 +51,8 @@ - '^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$' dump: 'ramsmp-intmem.log' - register: ramsmp_intmem_metrics + register: intmem_metrics + tags: [collect] - name: collect float memory metrics from ramspeed collect: @@ -58,4 +64,12 @@ - '^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$' dump: 'ramsmp-floatmem.log' - register: ramsmp_intmem_metrics + register: floatmem_metrics + tags: [collect] + +- name: create memory metrics report + template: + src: "{{ qtip_resources }}/template/mem-metrics.j2" + dest: "{{ qtip_reports }}/mem-metrics" + delegate_to: localhost + tags: [report] diff --git a/resources/template/mem-metrics.j2 b/resources/template/mem-metrics.j2 new file mode 100644 index 00000000..6b1b6bd4 --- /dev/null +++ b/resources/template/mem-metrics.j2 @@ -0,0 +1,24 @@ +Memory +====== + +{% for host in groups['compute'] %} +{{ hostvars[host].ansible_hostname }} +----------------------------- + +INTEGER +^^^^^^^ +{% set metrics=hostvars[host].intmem_metrics %} +{{ ('Copy', metrics.integer_copy[0])|justify }} +{{ ('Scale', metrics.integer_scale[0])|justify }} +{{ ('Add', metrics.integer_add[0])|justify }} +{{ ('Triad', metrics.integer_triad[0])|justify }} + +FL-POINT +^^^^^^^^ +{% set metrics=hostvars[host].floatmem_metrics %} +{{ ('Copy', metrics.float_copy[0])|justify }} +{{ ('Scale', metrics.float_scale[0])|justify }} +{{ ('Add', metrics.float_add[0])|justify }} +{{ ('Triad', metrics.float_triad[0])|justify }} + +{% endfor %} |