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>
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
+++ /dev/null
-#! /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
+++ /dev/null
-#!/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/'
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)
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
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)
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']={};
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)
"compute": {
"dhrystone": 3146.66,
"dpi": 8.12,
+ "ramspeed": {
+ "FLOATmem": {
+ "Average (MB/s)": 9780.23
+ },
+ "INTmem": {
+ "Average (MB/s)": 11775.85
+ }
+ },
"ssl": {
"AES": {
"1024B": 808861020,
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)
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
-
+
+
+
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)
-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
usage ;;
esac
done
-./data/fetch_os_creds.sh -d ./data/opnfv-creds.sh
+./data/fetch_os_creds.sh -d ./opnfv-creds.sh
--- /dev/null
+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:
+ '''
+
--- /dev/null
+
+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: '''
+
+
--- /dev/null
+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:
+ '''
+
--- /dev/null
+
+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: '''
+
+
--- /dev/null
+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:
+ '''
+
dhrystone_vm.yaml
dhrystone_bm.yaml
whetstone_bm.yaml
+whetstone_vm.yaml
ssl_bm.yaml
dpi_bm.yaml
+ramspeed_bm.yaml