Include Ramspeed Index calulcation 81/6681/1
authorNauman_Ahad <Nauman_Ahad@dell.com>
Tue, 12 Jan 2016 09:47:37 +0000 (14:47 +0500)
committerNauman Ahad <Nauman_Ahad@dell.com>
Thu, 14 Jan 2016 11:57:11 +0000 (11:57 +0000)
Ramspeed Index calculation included.
Additionally, error handling for suite indices calulcation
to ignore absent result files

Change-Id: I8b2360b0f16b6d3b7d8485e88a0c1f7f0787ad5a
Signed-off-by: Nauman_Ahad <Nauman_Ahad@dell.com>
(cherry picked from commit 90eb79018b459c1aa6606168f1ee592da535643c)

18 files changed:
benchmarks/playbooks/result_transform/ramspd/ramspd_transform.py
clean.sh [deleted file]
data/opnfv-creds.sh [deleted file]
data/ref_results/compute_benchmarks_indices.py
data/ref_results/compute_suite.py
data/ref_results/generator_ref_json.py
data/ref_results/network_suite.py
data/ref_results/reference.json
data/ref_results/result_accum.py
data/ref_results/storage_suite.py
docker/run_qtip.sh
get_env_info.sh
test_cases/default/compute/ramspeed_vm.yaml [new file with mode: 0644]
test_cases/dell-us-deploying-bm3/compute/ramspeed_bm.yaml [new file with mode: 0644]
test_cases/dell-us-deploying-bm3/compute/ramspeed_vm.yaml [new file with mode: 0644]
test_cases/dell-us-testing-bm-1/compute/ramspeed_bm.yaml [new file with mode: 0644]
test_cases/dell-us-testing-bm-1/compute/ramspeed_vm.yaml [new file with mode: 0644]
test_list/compute

index a7b0352..2f27a28 100644 (file)
@@ -34,19 +34,19 @@ os.system("cp  Floatmem >> " + hostname + "-" + time_stamp + ".log")
 result = {};
 
 result['1. INTmem bandwidth'] = {};
-result['1. INTmem bandwidth']['1. Copy (MB/s)'] = [intmem_copy]
-result['1. INTmem bandwidth']['2. Add (MB/s)'] = [intmem_add]
-result['1. INTmem bandwidth']['3. Scale (MB/s)'] = [intmem_scale]
-result['1. INTmem bandwidth']['4.Triad (MB/s)']= [intmem_triad]
-result['1. INTmem bandwidth']['5. Average (MB/s)'] = [intmem_average]
+result['1. INTmem bandwidth']['1. Copy (MB/s)']=intmem_copy
+result['1. INTmem bandwidth']['2. Add (MB/s)']=intmem_add
+result['1. INTmem bandwidth']['3. Scale (MB/s)']=intmem_scale
+result['1. INTmem bandwidth']['4. Triad (MB/s)']=intmem_triad
+result['1. INTmem bandwidth']['5. Average (MB/s)']=intmem_average
 
 
 result['2. FLOATmem bandwidth'] = {};
-result['2. FLOATmem bandwidth']['1.Copy (MB/s)']=[floatmem_copy]
-result['2. FLOATmem bandwidth']['2.Add (MB/s)']=[floatmem_add]
-result['2. FLOATmem bandwidth']['3.Scale (MB/s)']=[floatmem_scale]
-result['2. FLOATmem bandwidth']['4.Triad (MB/s)']=[floatmem_triad]
-result['2. FLOATmem bandwidth']['4.Copy (MB/s)']=[floatmem_average]
+result['2. FLOATmem bandwidth']['1. Copy (MB/s)']=floatmem_copy
+result['2. FLOATmem bandwidth']['2. Add (MB/s)']=floatmem_add
+result['2. FLOATmem bandwidth']['3. Scale (MB/s)']=floatmem_scale
+result['2. FLOATmem bandwidth']['4. Triad (MB/s)']=floatmem_triad
+result['2. FLOATmem bandwidth']['5. Average(MB/s)']=floatmem_average
 
 
 
diff --git a/clean.sh b/clean.sh
deleted file mode 100755 (executable)
index 27c8a48..0000000
--- a/clean.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-echo cleaning Ip
-
-#sed -i -e '/demo1/{ n;N;N;N;N;d; }' /etc/ansible/hosts
-neutron floatingip-delete $(neutron floatingip-list| grep "17" | awk '{print $2;}')
-#heat stack-delete exp2
diff --git a/data/opnfv-creds.sh b/data/opnfv-creds.sh
deleted file mode 100644 (file)
index 9266c19..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-export LC_ALL=C
-export OS_NO_CACHE='true'
-export OS_TENANT_NAME='admin'
-export OS_USERNAME='admin'
-export OS_PASSWORD='admin'
-export OS_AUTH_URL='http://172.18.0.69:5000/v2.0'
-export OS_AUTH_STRATEGY='keystone'
-export OS_REGION_NAME='RegionOne'
-export CINDER_ENDPOINT_TYPE='internalURL'
-export GLANCE_ENDPOINT_TYPE='internalURL'
-export KEYSTONE_ENDPOINT_TYPE='internalURL'
-export NOVA_ENDPOINT_TYPE='internalURL'
-export NEUTRON_ENDPOINT_TYPE='internalURL'
-export OS_ENDPOINT_TYPE='internalURL'
-export MURANO_REPO_URL='http://storage.apps.openstack.org/'
index 305b6b0..1e6922e 100644 (file)
@@ -9,7 +9,7 @@ def dpi_index ():
     for k,v in dpi_dict.iteritems():
         for i,j in dpi_dict[k].iteritems():
             if i=="3  DPI result": 
-                raw_num=int(dpi_dict[k][i]["DPI_benchmark(Gb/s)"])
+                raw_num=float(dpi_dict[k][i]["DPI_benchmark(Gb/s)"])
                 total=total+raw_num
     
     l=len(dpi_dict)
@@ -45,6 +45,37 @@ def dwstone_index (file_dir,benchmark):
     dwstone_dict_i['2. Results']=dwstone_dict
     return dwstone_dict_i
 
+
+def ramspeed_index ():
+    total_int=0
+    total_float=0
+    ramspeed_dict=concat('../../results/ramspeed/')
+    for k,v in ramspeed_dict.iteritems():
+        for i,j in ramspeed_dict[k].iteritems():
+            if i=="3  RamSpeed result":
+                for a,b in ramspeed_dict[k][i].iteritems():
+                    if a=="1. INTmem bandwidth":
+                        raw_int=ramspeed_dict[k][i][a]["5. Average (MB/s)"]
+                        total_int=total_int+float(raw_int)
+                    elif a=="2. FLOATmem bandwidth":
+                        raw_float=ramspeed_dict[k][i][a]["5. Average (MB/s)"]
+                        total_float=total_float+float(raw_float)
+
+    l=len(ramspeed_dict)
+    with open ('./reference.json') as reference_file:
+        reference_djson=json.load(reference_file)
+        int_mem_ref=reference_djson['compute']['ramspeed']['INTmem']['Average (MB/s)']
+        float_mem_ref=reference_djson['compute']['ramspeed']['FLOATmem']['Average (MB/s)']
+        
+    int_mem_index= float((total_int/l)/int_mem_ref)
+    float_mem_index=float((total_float/l)/float_mem_ref)
+    ramspeed_index=float((int_mem_index+float_mem_index)/2)
+    ramspeed_dict_i={};
+    ramspeed_dict_i['1. Index']=ramspeed_index
+    ramspeed_dict_i['2. Results']=ramspeed_dict
+    return ramspeed_dict_i
+
+
 def ssl_index ():
     total_512rsa=0
     total_1024rsa=0
index 78eaae6..ce7f33c 100644 (file)
@@ -3,20 +3,53 @@ import compute_benchmarks_indices as benchmark_indices
 
 
 compute_dict={};
-compute_dict['DPI']=benchmark_indices.dpi_index()
-compute_dict['Dhrystone']=benchmark_indices.dwstone_index('dhrystone','Dhrystone')
-compute_dict['Whetstone']=benchmark_indices.dwstone_index('whetstone','Whetstone') 
-compute_dict['SSL']=benchmark_indices.ssl_index()
 
-compute_bench_list=['DPI','Dhrystone','Whetstone','SSL']
+try:
+   compute_dict['DPI']=benchmark_indices.dpi_index()
+except  OSError:
+    pass
+   
+   
+
+try:
+    compute_dict['Dhrystone']=benchmark_indices.dwstone_index('dhrystone','Dhrystone')
+except OSError:
+    pass
+
+try:
+    compute_dict['Whetstone']=benchmark_indices.dwstone_index('whetstone','Whetstone') 
+except OSError:
+    pass
+
+try:
+    compute_dict['SSL']=benchmark_indices.ssl_index()
+except OSError:
+    pass
+
+try:
+    compute_dict['RamSpeed']=benchmark_indices.ramspeed_index()
+except OSError:
+    pass
+
+
+compute_bench_list=['DPI','Dhrystone','Whetstone','SSL','RamSpeed']
+l=len(compute_bench_list)
+
 temp=0
 for benchmark in compute_bench_list:
-    temp=temp+float(compute_dict[benchmark]['1. Index'])
-compute_suite_index=temp/len(compute_bench_list)
-
-compute_dict_f={};
-compute_dict_f['1. Index']=compute_suite_index
-compute_dict_f['2. Compute suite results']=compute_dict
-with open('../../results/compute_result.json', 'w+') as result_json:
-    json.dump(compute_dict_f, result_json, indent=4, sort_keys=True)
+    try:
+        temp=temp+float(compute_dict[benchmark]['1. Index'])
+    except KeyError:
+        l=l-1
+        pass
+
+if l == 0:
+    print "No compute suite results found"
+else:
+    compute_suite_index=temp/l 
+    compute_dict_f={};
+    compute_dict_f['index']=compute_suite_index
+    compute_dict_f['suite results']=compute_dict
+    with open('../../results/compute_result.json', 'w+') as result_json:
+        json.dump(compute_dict_f, result_json, indent=4, sort_keys=True)
 
index 986ac61..a82dbc5 100644 (file)
@@ -20,6 +20,11 @@ dict_ref['compute']['ssl']['AES']['256B']=803323650
 dict_ref['compute']['ssl']['AES']['1024B']=808861020
 dict_ref['compute']['ssl']['AES']['8192B']=807701160
 
+dict_ref['compute']['ramspeed']={};
+dict_ref['compute']['ramspeed']['INTmem']={};
+dict_ref['compute']['ramspeed']['FLOATmem']={};
+dict_ref['compute']['ramspeed']['INTmem']['Average (MB/s)']=11775.85
+dict_ref['compute']['ramspeed']['FLOATmem']['Average (MB/s)']=9780.23
 
 dict_ref['storage']={};
 dict_ref['storage']['read']={};
index 0e687f6..fd756aa 100644 (file)
@@ -3,20 +3,32 @@ import network_benchmarks_indices as benchmark_indices
 
 
 network_dict={};
-network_dict['IPERF']=benchmark_indices.iperf_index()
+try:
+    network_dict['IPERF']=benchmark_indices.iperf_index()
+except:
+    pass
 
 
 
 
 network_bench_list=['IPERF']
 temp=0
+l=len(network_bench_list)
+
 for benchmark in network_bench_list:
-    temp=temp+float(network_dict[benchmark]['1. Index'])
-network_suite_index=temp/len(network_bench_list)
-
-network_dict_f={};
-network_dict_f['1. Index']=network_suite_index
-network_dict_f['2. Network suite results']=network_dict
-with open('../../results/network_result.json', 'w+') as result_json:
-    json.dump(network_dict_f, result_json, indent=4, sort_keys=True)
+    try:
+        temp=temp+float(network_dict[benchmark]['1. Index'])
+    except:
+        l=l-1
+        pass
+
+if l == 0:
+   print "No network results found"
+else:
+    network_suite_index=temp/len(network_bench_list)
+    network_dict_f={};
+    network_dict_f['index']=network_suite_index
+    network_dict_f['suite results']=network_dict
+    with open('../../results/network_result.json', 'w+') as result_json:
+        json.dump(network_dict_f, result_json, indent=4, sort_keys=True)
 
index 7ded553..cd5f7e6 100644 (file)
@@ -2,6 +2,14 @@
     "compute": {
         "dhrystone": 3146.66, 
         "dpi": 8.12, 
+        "ramspeed": {
+            "FLOATmem": {
+                "Average (MB/s)": 9780.23
+            }, 
+            "INTmem": {
+                "Average (MB/s)": 11775.85
+            }
+        }, 
         "ssl": {
             "AES": {
                 "1024B": 808861020, 
index 4c60004..4fffb6b 100644 (file)
@@ -5,12 +5,12 @@ def result_concat(targ_dir):
     list_vm=[];
     list_bm=[];
     diction={};
+   
     for file in os.listdir(targ_dir):
         if file.endswith(".json"):
             if file.startswith("instance"):
                 print str(file)
                 list_vm.append(file)
-                #echo "I am here"
             else:
                 list_bm.append(file)
     l=len(list_bm)
@@ -21,11 +21,13 @@ def result_concat(targ_dir):
         with open (targ_dir+file_t) as result_file:
             result_djson=json.load(result_file)
             diction['Baremetal'+str(int(x+1))]=result_djson
-
+        
     for x in range (0,k):
         file_t=list_vm[x]
         with open (targ_dir+file_t) as result_file:
             result_djson=json.load(result_file)
             diction['Virtual Machine '+str(x+1)]=result_djson
     return diction
-
+    
+   
+         
index 0c5b4c6..5c1a89a 100644 (file)
@@ -3,20 +3,29 @@ import storage_benchmarks_indices as benchmark_indices
 
 
 storage_dict={};
-storage_dict['FIO']=benchmark_indices.fio_index()
-
-
-
+try:
+    storage_dict['FIO']=benchmark_indices.fio_index()
+except OSError:
+    pass
+    
 
 storage_bench_list=['FIO']
+l=len(storage_bench_list)
 temp=0
 for benchmark in storage_bench_list:
-    temp=temp+float(storage_dict[benchmark]['1. Index'])
-storage_suite_index=temp/len(storage_bench_list)
-
-storage_dict_f={};
-storage_dict_f['1. Index']=storage_suite_index
-storage_dict_f['2. Storage suite results']=storage_dict
-with open('../../results/storage_result.json', 'w+') as result_json:
-    json.dump(storage_dict_f, result_json, indent=4, sort_keys=True)
+    try:
+        temp=temp+float(storage_dict[benchmark]['1. Index'])
+    except KeyError:
+        l-=1
+        
+   
+if l == 0:
+    print "No Storage results found"
+else:
+    storage_suite_index=temp/l
+    storage_dict_f={};
+    storage_dict_f['index']=storage_suite_index
+    storage_dict_f['storage suite']=storage_dict
+    with open('../../results/storage_result.json', 'w+') as result_json:
+        json.dump(storage_dict_f, result_json, indent=4, sort_keys=True)
 
index f6a78e7..e6c2ed9 100755 (executable)
@@ -7,7 +7,7 @@ cd ${QTIP_DIR}  &&  source get_env_info.sh \
 -n ${INSTALLER_TYPE} \
 -i ${INSTALLER_IP}
 
-source ${QTIP_DIR}/data/opnfv-creds.sh
+source ${QTIP_DIR}/opnfv-creds.sh
 
 if [ "$TEST_CASE" == "compute" ]; then
     cd ${QTIP_DIR}  && python qtip.py -l ${NODE_NAME} -f compute.txt
index 77af011..6a4dd53 100755 (executable)
@@ -19,4 +19,4 @@ while getopts ":n:i:" optchar; do
            usage ;;
     esac
 done
-./data/fetch_os_creds.sh -d ./data/opnfv-creds.sh
+./data/fetch_os_creds.sh -d ./opnfv-creds.sh
diff --git a/test_cases/default/compute/ramspeed_vm.yaml b/test_cases/default/compute/ramspeed_vm.yaml
new file mode 100644 (file)
index 0000000..b79f444
--- /dev/null
@@ -0,0 +1,45 @@
+Scenario:
+  benchmark: ramspeed
+  host: virtualmachine_1, virtualmachine_2
+  server: blakc
+
+Context:
+  Host_Machines:
+
+  Virtual_Machines:  
+    virtualmachine_1:
+      availability_zone: compute1
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+    virtualmachine_2:
+      availability_zone: compute2
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+  
+Test_Description:
+  Test_category: "Compute"
+  Benchmark: "dhrystone"
+  Overview: >
+        '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n
+         if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+         machine_1:
+         ip: 172.18.0.16
+         pw: Op3nStack
+         role: host
+         machine_2:
+         ip: 172.18.0.15
+         pw: Op3nStack
+         role: host
+
+        virtualmachine_1:
+          availability_zone:
+          public_network:
+          OS_image:
+          flavor:
+          role:
+        '''
+
diff --git a/test_cases/dell-us-deploying-bm3/compute/ramspeed_bm.yaml b/test_cases/dell-us-deploying-bm3/compute/ramspeed_bm.yaml
new file mode 100644 (file)
index 0000000..47b933b
--- /dev/null
@@ -0,0 +1,35 @@
+  
+Scenario:
+  benchmark: ramspeed
+  host: machine_1, machine_2
+  server: 
+
+Context:
+  Host_Machines:
+    machine_1:
+      ip: 10.20.0.4
+      pw: 
+      role: host
+    machine_2:
+      ip: 10.20.0.5
+      pw:
+      role: host
+
+  Virtual_Machines:  
+    
+
+Test_Description:
+  Test_category: "Compute"
+  Benchmark: "dhrystone"
+  Overview: >
+        ''' This test will run the dhrystone benchmark in parallel  on machine_1 and machine_2.\n
+         if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+
+        virtualmachine_1:
+          availability_zone:
+          public_network:
+          OS_image:
+          flavor:
+          role: '''
+  
diff --git a/test_cases/dell-us-deploying-bm3/compute/ramspeed_vm.yaml b/test_cases/dell-us-deploying-bm3/compute/ramspeed_vm.yaml
new file mode 100644 (file)
index 0000000..b79f444
--- /dev/null
@@ -0,0 +1,45 @@
+Scenario:
+  benchmark: ramspeed
+  host: virtualmachine_1, virtualmachine_2
+  server: blakc
+
+Context:
+  Host_Machines:
+
+  Virtual_Machines:  
+    virtualmachine_1:
+      availability_zone: compute1
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+    virtualmachine_2:
+      availability_zone: compute2
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+  
+Test_Description:
+  Test_category: "Compute"
+  Benchmark: "dhrystone"
+  Overview: >
+        '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n
+         if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+         machine_1:
+         ip: 172.18.0.16
+         pw: Op3nStack
+         role: host
+         machine_2:
+         ip: 172.18.0.15
+         pw: Op3nStack
+         role: host
+
+        virtualmachine_1:
+          availability_zone:
+          public_network:
+          OS_image:
+          flavor:
+          role:
+        '''
+
diff --git a/test_cases/dell-us-testing-bm-1/compute/ramspeed_bm.yaml b/test_cases/dell-us-testing-bm-1/compute/ramspeed_bm.yaml
new file mode 100644 (file)
index 0000000..a8d2cbf
--- /dev/null
@@ -0,0 +1,35 @@
+  
+Scenario:
+  benchmark: ramspeed
+  host: machine_1, machine_2
+  server: 
+
+Context:
+  Host_Machines:
+    machine_1:
+      ip: 10.20.0.6
+      pw: 
+      role: host
+    machine_2:
+      ip: 10.20.0.5
+      pw:
+      role: host
+
+  Virtual_Machines:  
+    
+
+Test_Description:
+  Test_category: "Compute"
+  Benchmark: "dhrystone"
+  Overview: >
+        ''' This test will run the dhrystone benchmark in parallel  on machine_1 and machine_2.\n
+         if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+
+        virtualmachine_1:
+          availability_zone:
+          public_network:
+          OS_image:
+          flavor:
+          role: '''
+  
diff --git a/test_cases/dell-us-testing-bm-1/compute/ramspeed_vm.yaml b/test_cases/dell-us-testing-bm-1/compute/ramspeed_vm.yaml
new file mode 100644 (file)
index 0000000..b79f444
--- /dev/null
@@ -0,0 +1,45 @@
+Scenario:
+  benchmark: ramspeed
+  host: virtualmachine_1, virtualmachine_2
+  server: blakc
+
+Context:
+  Host_Machines:
+
+  Virtual_Machines:  
+    virtualmachine_1:
+      availability_zone: compute1
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+    virtualmachine_2:
+      availability_zone: compute2
+      public_network: 'net04_ext'
+      OS_image: QTIP_CentOS
+      flavor: m1.large
+      role: host
+  
+Test_Description:
+  Test_category: "Compute"
+  Benchmark: "dhrystone"
+  Overview: >
+        '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n
+         if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+         machine_1:
+         ip: 172.18.0.16
+         pw: Op3nStack
+         role: host
+         machine_2:
+         ip: 172.18.0.15
+         pw: Op3nStack
+         role: host
+
+        virtualmachine_1:
+          availability_zone:
+          public_network:
+          OS_image:
+          flavor:
+          role:
+        '''
+
index 6896da3..825ac68 100644 (file)
@@ -1,5 +1,7 @@
 dhrystone_vm.yaml
 dhrystone_bm.yaml
 whetstone_bm.yaml
+whetstone_vm.yaml
 ssl_bm.yaml
 dpi_bm.yaml
+ramspeed_bm.yaml