Minor changes to the code, to prep for code freeze. 95/5395/1
authorMofassir <Mofassir_arif@Dellteam.com>
Thu, 31 Dec 2015 07:58:38 +0000 (23:58 -0800)
committerMofassir <Mofassir_arif@Dellteam.com>
Thu, 31 Dec 2015 07:58:38 +0000 (23:58 -0800)
the result format of iperf has been made consistent

Change-Id: Iede4b381ca2e5d7643bf6420f17684bbf2cc2921
Signed-off-by: Mofassir <Mofassir_arif@Dellteam.com>
12 files changed:
benchmarks/playbooks/fio.yaml
benchmarks/playbooks/iperf.yaml
benchmarks/playbooks/netperf.yaml
benchmarks/playbooks/result_transform/iperf/iperf_transform.py [new file with mode: 0644]
data/hosts
data/my_key.pem
test_cases/dell_santa_clara/network/iperf_topology_1.yaml
test_cases/dell_santa_clara/network/iperf_topology_2.yaml
test_cases/dell_santa_clara/network/netperf.yaml
test_cases/dell_santa_clara/storage/fio_parallel.yaml
test_list/network.txt
test_list/storage.txt

index 40fd805..9f832ce 100644 (file)
@@ -2,9 +2,9 @@
    connection: local
    tasks:
     - name: making fio  directory
-      file: path={{Dest_dir}}/fio state=directory
+      file: path=../../{{Dest_dir}}/fio state=directory
     - name: making temporary fio directory
-      file: path={{Dest_dir}}/fio/fio_temp state=directory
+      file: path=../../{{Dest_dir}}/fio/fio_temp state=directory
 
 
  - hosts: "{{role}}"
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2
       register: files_to_copy
     - name: copy results
-      fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/fio/fio_temp
+      fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/fio/fio_temp
       with_items: files_to_copy.stdout_lines
     - name: registering log files
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
       register: copy_log_results
     - name: copying log results
-      fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/fio/fio_temp
+      fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/fio/fio_temp
       with_items: copy_log_results.stdout_lines
 
 
     - name: copy results
-      fetch:  src=/root/results/{{item}}  dest={{Dest_dir}}/fio
+      fetch:  src=/root/results/{{item}}  dest=../../{{Dest_dir}}/fio
       with_items: files_to_copy.stdout_lines
 
  - hosts: 127.0.0.1
    connection: local
    tasks:
     - name: extracting_json
-      shell: ( find  {{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/fio/)
+      shell: ( find  ../../{{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/fio/)
     - name: making_logs_folder
-      shell: mkdir -p {{Dest_dir}}/fio/logs
+      shell: mkdir -p ../../{{Dest_dir}}/fio/logs
     - name: extracting_log
-      shell: ( find {{Dest_dir}}/fio/fio_temp/ -name "*.log"  | xargs cp -t {{Dest_dir}}/fio/logs)
+      shell: ( find ../../{{Dest_dir}}/fio/fio_temp/ -name "*.log"  | xargs cp -t ../../{{Dest_dir}}/fio/logs)
     - name: removing fio_log
-      shell: rm -rf {{Dest_dir}}/fio/fio_temp
+      shell: rm -rf ../../{{Dest_dir}}/fio/fio_temp
 
index dd5c2b0..11d427f 100644 (file)
       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:
         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
index fb6fd18..3292f06 100644 (file)
@@ -71,4 +71,6 @@
         when: role is defined
     - name: extracting_json
       shell: ( find  ../../{{Dest_dir}}/netperf/netperf_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/netperf/)
-      when: rolename == "2-host"
\ No newline at end of file
+      when: rolename == "2-host"
+    - name: removing netperf_temp
+      shell: rm -rf ../../{{Dest_dir}}/netperf/netperf_temp
\ No newline at end of file
diff --git a/benchmarks/playbooks/result_transform/iperf/iperf_transform.py b/benchmarks/playbooks/result_transform/iperf/iperf_transform.py
new file mode 100644 (file)
index 0000000..39c5956
--- /dev/null
@@ -0,0 +1,30 @@
+import json\r
+import datetime\r
+import pickle\r
+with open('iperf_raw.json','r') as ifile:\r
+    raw_iperf_data=json.loads(ifile.read().rstrip())\r
+    \r
+    \r
+bits_sent= raw_iperf_data['end']['sum_sent']['bits_per_second']\r
+bits_received= raw_iperf_data['end']['sum_received']['bits_per_second']\r
+total_byte_sent=raw_iperf_data['end']['sum_sent']['bytes']\r
+total_byte_received=raw_iperf_data['end']['sum_received']['bytes']\r
+cpu_host_total_percent=raw_iperf_data['end']['cpu_utilization_percent']['host_total']\r
+cpu_remote_total_percent=raw_iperf_data['end']['cpu_utilization_percent']['remote_total']\r
+\r
+result={}\r
+time_stamp = str(datetime.datetime.utcnow().isoformat())\r
+\r
+result['1. Version']=raw_iperf_data['start']['version']\r
+result['2. Bandwidth']={}\r
+result['2. Bandwidth']['1. throughput Sender (b/s)'] = bits_sent\r
+result['2. Bandwidth']['2. throughput Received (b/s)'] = bits_received\r
+result['3. CPU']={}\r
+result['3. CPU']['1. CPU host total (%)']=cpu_host_total_percent\r
+result['3. CPU']['2. CPU remote total (%)']=cpu_remote_total_percent\r
+\r
+with open('iperf_raw-'+time_stamp+'.log','w+') as ofile:\r
+    ofile.write(json.dumps(raw_iperf_data))\r
+    \r
+with open('./result_temp', 'w+') as result_file:\r
+    pickle.dump(result,result_file)
\ No newline at end of file
index 5d73834..ac441ab 100644 (file)
@@ -1,3 +1,4 @@
-[1Run]
-172.18.0.100
-172.18.0.99
+[2-host]
+172.18.0.112
+[1-server]
+172.18.0.113
index 50a6b86..701beaf 100644 (file)
@@ -1,27 +1,27 @@
 -----BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAv5Y+wZP4KOzZf3hahb3UVUYf235R21M9lo6xnoie1ph71Pa+
-uHeCAnUhQs/RzCoi6y8U2JrPqmF3/HaP0CSPTyAZTdiKqHspQdLDndTdSMcVOMw0
-1C4QdQPTsejwsLW4ktxw/xjroZEhVyij5tJdCGjFLtPXXmYdPy4zSMqAOMuPvelE
-IlkEqcRkqQ0X0UBjQTDJvHKw1wYH9sFQLwMpuUI4JU1uHiC19LjJxV0Ih67yIXyw
-TSzw35rWPAbumgfJ5wG6k4jw1s8zYet10pXYMIxsAevieb8skSz97ytQKIVUjj/j
-6NfyoMxTuEKT8uvxwlx5QHU2N3A6qHVigWjmVQIDAQABAoIBAQC3KW2/5bYHckCR
-hD+Owyg/ijYkwwSBGXi0+qDG/rhUUx14QZmeg+qQbOiqlkJt3Q7bJ3zXhFHrAxoS
-DEt7Y6h6riZi7RXK80xDOLt5pisUS/h2/4u2Gn/zTwBRg3CwkFrwVL3WtD15jmWA
-jUL9BrqYsolpNnAdOKTXZVT0T1z8bb0FpRRCkKrYAUWF6ansvv7gryTLXjEvdBCp
-THz9QCMdGSm6bOM1uhRQciT4v0of+NiSBnbiWjXK8AFVVXYRmm0dk/9oY5VYVkCS
-RdWblKaag4jDg2I0LCInfWHyuBzaFyRSNfBaIEJyrxMZQ6WwfxvoECFXzaFEif4Q
-j8OYe//hAoGBAP3y7VM8ESkTDaAGjsc1n9W3UNcsl8mmTBOo1rTkP9lV+Wx3aO4W
-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I4+PA72B
+vjiKVpeU8J9+HgGaX902KoEP8ACh2lJPEsCck+FSPqbPp+jyrHmwR46tJq318MvP
+noANm/39O8uesMLa0Zy0qit2k86YVH3FrMVrED25IklBbZUNjuFGcba9txRqeK/h
+9oVJTwKBgEWKRVYpBK7SzR+7RQZYcO681FXHC4l3e4GBZaNXxEnpyy+qwYpHML/3
+5jgTZ8OusMosfdWWP87ce9D97iXADJ5gaMZr3c7w1VbJqxSu7dX96lNmvzjdGW1M
+WFCHXmPXElZtmcPXCMoA9G5rUSBnwEgNe5ILdejz/l9TNp1OD0+F
 -----END RSA PRIVATE KEY-----
index 20a433a..18eba8a 100644 (file)
@@ -4,8 +4,8 @@ Scenario:
   server : virtualmachine_1
   client: virtualmachine_2
   benchmark_details:
-    duration: 1
-    protocol: udp
+    duration: 2
+    protocol: tcp
     bandwidthGbps: 10
 
 Context:
@@ -14,16 +14,16 @@ Context:
 
   Virtual_Machines:
     virtualmachine_1:
-      availability_zone: compute2
+      availability_zone: compute1
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 1-server
       flavor: m1.large   
 
     virtualmachine_2:
-      availability_zone: compute2
+      availability_zone: compute1
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 2-host
       flavor: m1.large
     
index 4392f32..301a991 100644 (file)
@@ -5,8 +5,8 @@ Scenario:
   client: virtualmachine_2
   benchmark_details:
     duration: 20
-    protocol: udp
-    bandwidthGbps: 1
+    protocol: tcp
+    bandwidthGbps: 10
 
 Context:
   Host_Machines:
@@ -16,14 +16,14 @@ Context:
     virtualmachine_1:
       availability_zone: compute1
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 1-server
       flavor: m1.large   
 
     virtualmachine_2:
       availability_zone: compute2
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 2-host
       flavor: m1.large
     
index 60ee4a1..267b288 100644 (file)
@@ -15,14 +15,14 @@ Context:
     virtualmachine_1:
       availability_zone: compute2
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 1-server
       flavor: m1.large   
 
     virtualmachine_2:
       availability_zone: compute2
       OS_image: QTIP_CentOS
-      public_network: 'provider_network'
+      public_network: 'net04_ext'
       role: 2-host
       flavor: m1.large
     
index e058af2..9f11af0 100644 (file)
@@ -6,11 +6,11 @@ Scenario:
 Context:
   Host_Machines:
     machine_1:
-      ip: 10.20.0.4
+      ip: 10.20.0.6
       pw: r00tme
       role: host
     machine_2:
-      ip: 10.20.0.5
+      ip: 10.20.0.7
       pw: r00tme
       role: host
 
index e69de29..3ed6f82 100644 (file)
@@ -0,0 +1 @@
+iperf_topology_1.yaml
index e69de29..7884a43 100644 (file)
@@ -0,0 +1 @@
+fio_parallel.yaml