aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/playbooks/iperf.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/playbooks/iperf.yaml')
-rw-r--r--benchmarks/playbooks/iperf.yaml44
1 files changed, 35 insertions, 9 deletions
diff --git a/benchmarks/playbooks/iperf.yaml b/benchmarks/playbooks/iperf.yaml
index dd5c2b0f..11d427f3 100644
--- a/benchmarks/playbooks/iperf.yaml
+++ b/benchmarks/playbooks/iperf.yaml
@@ -59,24 +59,40 @@
poll: 0
when: rolename == "1-server"
- name: Running Iperf on Host
- shell: iperf3 -Z --{{protocol}} --time {{duration}} -b {{bandwidthGbps}}G -c {{item}} -J >> ./qtip_result/server{{hostID.stdout}}-{{item}}.json
- ignore_errors: yes
- with_items:
- - "{{ip1}}"
- - "{{ip2}}"
- when: rolename == "2-host" and "{{ip2}}" != ''
- - name: Running Iperf on Host
- shell: iperf3 -Z --{{protocol}} --time {{duration}} -b {{bandwidthGbps}}G -c {{item}} -J >> ./qtip_result/server{{hostID.stdout}}-{{item}}.json
+ shell: iperf3 --time {{duration}} -b {{bandwidthGbps}}G -c {{privateip1}} -J -O10>> ./qtip_result/iperf_raw.json
ignore_errors: yes
with_items:
- "{{ip1}}"
when: rolename == "2-host" and "{{ip2}}" == ''
+ - name: Fetching result transformation script
+ copy: src=./result_transform/iperf/iperf_transform.py dest={{home_dir.stdout}}/qtip_result
+ - name: Transforming result
+ shell: cd $HOME/qtip_result && python iperf_transform.py
+ when: rolename =="2-host" and "{{ip2}}" == ''
+ - name: copy report formation script
+ copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result
+ when: rolename =="2-host" and "{{ip2}}" == ''
+ - name: consolidating report
+ shell: cd $HOME/qtip_result && python final_report.py IPERF
+ when: rolename =="2-host" and "{{ip2}}" == ''
- name: Files to Copy
shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2
register: files_to_copy
+ when: rolename =="2-host" and "{{ip2}}" == ''
- name: copy results
fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/iperf/iperf_temp
with_items: files_to_copy.stdout_lines
+ when: rolename =="2-host" and "{{ip2}}" == ''
+ - name: registering log files
+ shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
+ register: copy_log_results
+ when: rolename =="2-host" and "{{ip2}}" == ''
+ - name: copying log results
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/iperf/iperf_temp
+ with_items: copy_log_results.stdout_lines
+ when: rolename =="2-host" and "{{ip2}}" == ''
+
+
- hosts: 127.0.0.1
connection: local
tasks:
@@ -86,4 +102,14 @@
when: role is defined
- name: extracting_json
shell: ( find ../../{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/iperf/)
- when: rolename == "2-host" \ No newline at end of file
+ when: rolename == "2-host"
+ - name: making_logs_folder
+ shell: mkdir -p ../../{{Dest_dir}}/iperf/logs
+ - name: extracting_log
+ shell: ( find ../../{{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/iperf/logs)
+ when: rolename == "2-host"
+ - name: removing iperf_raw file
+ shell: rm -rf ../../{{Dest_dir}}/iperf/iperf_raw.json
+ when: rolename == "2-host"
+ - name: removing iperf_temp
+ shell: rm -rf ../../{{Dest_dir}}/iperf/iperf_temp \ No newline at end of file