aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/unixbench/tasks/main.yml
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-24 09:10:32 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-24 11:22:19 +0800
commit941eb361d74e71114c97e8de240e224d2ea2d8ef (patch)
tree5179184301bcf435456392d2c69ece7f2710d675 /resources/ansible_roles/unixbench/tasks/main.yml
parent48d36caabb09f2456a1d7ad64acb7aa099277eda (diff)
Collect arithmetic metrics from unixbench
Change-Id: I3e9ca649f3b35908c162d5036dcde3a333278f6d Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/unixbench/tasks/main.yml')
-rw-r--r--resources/ansible_roles/unixbench/tasks/main.yml43
1 files changed, 30 insertions, 13 deletions
diff --git a/resources/ansible_roles/unixbench/tasks/main.yml b/resources/ansible_roles/unixbench/tasks/main.yml
index ff2c3534..9b0a6f73 100644
--- a/resources/ansible_roles/unixbench/tasks/main.yml
+++ b/resources/ansible_roles/unixbench/tasks/main.yml
@@ -35,20 +35,37 @@
shell: "./Run -i {{ iterations }} -c {{ parallel_copies }} dhrystone whetstone"
args:
chdir: "{{ workdir }}/byte-unixbench-5.1.3/UnixBench"
+ register: unixbench_out
-- name: synchronize test results to local
- synchronize:
- mode: pull
- src: "{{ workdir }}/byte-unixbench-5.1.3/UnixBench/results/"
- dest: "{{ qtip_results }}/unixbench"
- use_ssh_args: yes
+- name: generating log filename
+ set_fact:
+ logfile: "{{ qtip_results }}/unixbench.log"
-- name: create integer and floating point report
+- name: saving output to log
+ copy:
+ content: "{{ unixbench_out.stdout }}"
+ dest: "{{ logfile }}"
+ delegate_to: localhost
+
+- name: saving unixbench output to log
+ copy:
+ content: "{{ unixbench_out.stdout }}"
+ dest: "{{ logfile }}"
+ delegate_to: localhost
+
+- name: collecting arithmetic metrics from unixbench
+ collect:
+ string: "{{ lookup('file', logfile) }}"
+ patterns:
+ # Dhrystone 2 using register variables 116700.0 29223521.3 2504.2
+ # Double-Precision Whetstone 55.0 3720.5 676.5
+ - '^Dhrystone 2 using register variables\s+(\d+\.\d+)\s+(?P<dhrystone_lps>\d+\.\d+)\s+(\d+\.\d+)'
+ - '^Double-Precision Whetstone\s+(\d+\.\d+)\s+(?P<whetstone_MWIPS>\d+\.\d+)\s+(\d+\.\d+)'
+ register: arithmetic_metrics
+ delegate_to: localhost
+
+- name: creating arithmetic metrics report
template:
- src: "{{ item }}.j2"
- dest: "{{ qtip_results }}/{{ item }}"
- with_items:
- - floating-point-metrics
- - integer-metrics
+ src: arithmetic-metrics.j2
+ dest: "{{ qtip_results }}/arithmetic-metrics"
delegate_to: localhost
- tags: [report]