diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-18 20:21:10 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-19 11:29:43 +0800 |
commit | cf4a1fc9562e0c7d205da5b4dc79824e53f1d304 (patch) | |
tree | ed7932c5ec38fe55e31c5f55e475961b423267a2 | |
parent | 973f0287b44b3bcac193bc069bd474fc252232db (diff) |
Backport ramspeed benchmarking playbook from qtip.driver
Change-Id: I99c6bcb43074cdf7f9edd93a0fe10b401fff4374
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r-- | resources/metric/ramspeed.yaml | 61 | ||||
-rw-r--r-- | tests/integration/run.yaml | 6 |
2 files changed, 66 insertions, 1 deletions
diff --git a/resources/metric/ramspeed.yaml b/resources/metric/ramspeed.yaml new file mode 100644 index 00000000..b25485cf --- /dev/null +++ b/resources/metric/ramspeed.yaml @@ -0,0 +1,61 @@ +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +- name: making ramspeed working directory + file: + path: "{{ cwd }}" + state: directory + +- name: download ramspeed/ramsmp + unarchive: + src: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz + dest: "{{ cwd }}" + remote_src: yes + +- name: build ramsmp + command: ./build.sh + args: + chdir: "{{ cwd }}/ramsmp-3.5.0" + creates: ramsmp + +- name: intmem benchmarking + command: ./ramsmp -b 3 -l 5 -p 1 + args: + chdir: "{{ cwd }}/ramsmp-3.5.0" + register: ramsmp_intmem_out + +- name: floatmem benchmarking + command: ./ramsmp -b 6 -l 5 -p 1 + args: + chdir: "{{ cwd }}/ramsmp-3.5.0" + register: ramsmp_floatmem_out + +- name: collect integer memory metrics from ramspeed + 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$' + dump: 'ramsmp-intmem.log' + register: ramsmp_intmem_metrics + +- name: collect float memory metrics from ramspeed + 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$' + dump: 'ramsmp-floatmem.log' + register: ramsmp_intmem_metrics diff --git a/tests/integration/run.yaml b/tests/integration/run.yaml index e715863f..5da8ca91 100644 --- a/tests/integration/run.yaml +++ b/tests/integration/run.yaml @@ -27,7 +27,11 @@ nDPI_cwd: "{{ ansible_env.HOME }}/qtip/nDPI" nDPI_file: "dpi.pcap" tags: [dpi] - + - name: memory metrics + include: "{{ qtip_resources }}/metric/ramspeed.yaml" + vars: + cwd: "{{ ansible_env.HOME }}/qtip/ramspeed" + tags: [mem] - hosts: compute tasks: - name: calculate QPI of compute |