summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/metric/ramspeed.yaml75
-rw-r--r--resources/template/mem-metrics.j224
-rw-r--r--tests/integration/fixtures/pod.json2
-rw-r--r--tests/integration/host_vars/localhost4
-rw-r--r--tests/integration/run.yaml6
5 files changed, 107 insertions, 4 deletions
diff --git a/resources/metric/ramspeed.yaml b/resources/metric/ramspeed.yaml
new file mode 100644
index 00000000..6473d576
--- /dev/null
+++ b/resources/metric/ramspeed.yaml
@@ -0,0 +1,75 @@
+##############################################################################
+# 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
+ 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:
+ 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: intmem_metrics
+ tags: [collect]
+
+- 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: 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 %}
diff --git a/tests/integration/fixtures/pod.json b/tests/integration/fixtures/pod.json
index 8c2863ba..654b5828 100644
--- a/tests/integration/fixtures/pod.json
+++ b/tests/integration/fixtures/pod.json
@@ -1,6 +1,6 @@
{
"details": "",
"role": "",
- "name": "internal",
+ "name": "qtip-pod",
"mode": ""
} \ No newline at end of file
diff --git a/tests/integration/host_vars/localhost b/tests/integration/host_vars/localhost
index 18d764cc..76b53b79 100644
--- a/tests/integration/host_vars/localhost
+++ b/tests/integration/host_vars/localhost
@@ -1,7 +1,7 @@
-testapi_url: http://localhost:8000/api/v1
+testapi_url: http://10.62.105.17:8711/api/v1
project_name: qtip
case_name: compute
-pod_name: internal
+pod_name: qtip-pod
installer: fuel
version: master
scenario: demo
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