dump = self._task.args.get('dump')
if dump is not None:
- dump_facts(task_vars['inventory_hostname'], [{'name': dump, 'content': string}])
+ dump_facts(task_vars['inventory_hostname'], [{'name': dump, 'content': string}], task_vars['qtip_results'])
return collect(patterns, string)
return captured
-def dump_facts(hostname, facts):
- dump_root = os.path.join('dump', hostname)
+def dump_facts(hostname, facts, root='results'):
+ dump_root = os.path.join(root, hostname)
if not os.path.exists(dump_root):
os.mkdir(dump_root)
return [{'name': fact['name'], 'result': open(os.path.join(dump_root, fact['name']), 'w+').write(fact['content'])}
- '.+\sproduct:\s+(?P<product>.+)\sv'
dump: 'inix.log'
register: system_info
+
+- name: create system information report
+ template:
+ src: system-info.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/system-info"
+ delegate_to: localhost
+ tags: [report]
- 'nDPI throughput:\s+?(?P<dpi_pps>\d+.\d+.*) \/ (?P<dpi_bps>\d+.\d+.*)$'
dump: 'nDPI.log'
register: dpi_metrics
+
+- name: create dpi report
+ template:
+ src: dpi-metrics.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/dpi-metrics"
+ delegate_to: localhost
+ tags: [report]
--- /dev/null
+nDPI throughput
+===============
+
+{{ ('Result:', "{} / {}".format(dpi_metrics.dpi_pps[0], dpi_metrics.dpi_bps[0]))|justify }}
# ?(?P<aes_128_cbc_256_bytes>\d+\.\w+)\s+
# ?(?P<aes_128_cbc_1024_bytes>\d+\.\w+)\s+
# ?(?P<aes_128_cbc_8192_bytes>\d+\.\w+)$
+
+- name: create SSL report
+ template:
+ src: ssl-metrics.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/ssl-metrics"
+ delegate_to: localhost
+ tags: [report]
--- /dev/null
+SSL
+===
+
roles:
- development-tools
- post_tasks:
- - name: create dumping directories
- file:
- path: "{{ qtip_dump }}/{{ inventory_hostname }}"
- state: directory
- delegate_to: localhost
-
tags: [setup]
spec: "{{ qtip_resources }}/QPI/compute.yaml"
register: qpi_result
delegate_to: localhost
- tags: [calculate]
+ tags: [qpi]
- hosts: localhost
aggregate:
group: compute
register: pod_result
+ tags: [pod]
# Generate and publish report
- - name: create report folder
- file:
- path: "{{ qtip_reports }}"
- state: directory
-
- - name: create system information report
- template:
- src: "{{ qtip_resources }}/template/system-info.j2"
- dest: "{{ qtip_reports }}/system-info"
-
- - name: create qpi report
- template:
- src: "{{ qtip_resources }}/template/qpi-report.j2"
- dest: "{{ qtip_reports }}/qpi-report"
- tags: [report]
-
- - name: create dpi metrics report
- template:
- src: "{{ qtip_resources }}/template/dpi-metrics.j2"
- dest: "{{ qtip_reports }}/dpi-metrics"
- tags: [report, dpi]
-
- name: push result to testapi
uri:
url: "{{ testapi_url }}/results"
state: directory
with_items:
- "{{ qtip_cache }}"
- - "{{ qtip_reports }}"
+ - "{{ qtip_results }}"
# Initialize testapi database
- hosts: localhost
##############################################################################
qtip_resources: "{{ qtip_package }}/resources"
-qtip_reports: reports
+qtip_results: results
qtip_fixtures: fixtures
qtip_dump: dump
qtip_cache: .cache
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]
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]
--- /dev/null
+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 }}
synchronize:
mode: pull
src: "{{ cwd }}/byte-unixbench-5.1.3/UnixBench/results"
- dest: "{{ qtip_dump }}/{{ inventory_hostname }}/unixbench"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/unixbench"
use_ssh_args: yes
+
+- name: create integer and floating point report
+ template:
+ src: "{{ item }}.j2"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/{{ item }}"
+ with_items:
+ - floating-point
+ - integer
+ delegate_to: localhost
+ tags: [report]
--- /dev/null
+Floating Point
+==============
\ No newline at end of file
--- /dev/null
+Integer
+=======
\ No newline at end of file
+++ /dev/null
-nDPI throughput
-===============
-
-{% for host in groups['compute'] %}
-{% set dpi_metrics=hostvars[host].dpi_metrics %}
-{{ (hostvars[host].ansible_hostname, "{} / {}".format(dpi_metrics.dpi_pps[0], dpi_metrics.dpi_bps[0]))|justify }}
-{% endfor %}
+++ /dev/null
-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 %}