diff options
author | Nauman_Ahad <nauman_ahad@xflowresearch.com> | 2016-02-01 17:03:50 +0500 |
---|---|---|
committer | Nauman_Ahad <nauman_ahad@xflowresearch.com> | 2016-02-01 17:11:14 +0500 |
commit | 49b4662f32c415ea141ff269ba39d9a401b6e320 (patch) | |
tree | 68d44929f3ce9106660bcb0f69c70bf47669328c /data/ref_results/network_benchmarks_indices.py | |
parent | 9c4e1e7f2021e9f05fa6e98cd212a6ddeb0fd2e5 (diff) |
Fixed the index calculation for QTIP compute, network and storage suites
Earlier inaccurate index calculation updated.
Now indices take into account vm and bm cases
Change-Id: Icf2d7fc17ef765f5c0611b5371d57410ba155cb6
Signed-off-by: Nauman_Ahad <nauman_ahad@xflowresearch.com>
Diffstat (limited to 'data/ref_results/network_benchmarks_indices.py')
-rw-r--r-- | data/ref_results/network_benchmarks_indices.py | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/data/ref_results/network_benchmarks_indices.py b/data/ref_results/network_benchmarks_indices.py index f841a65f..b98269b6 100644 --- a/data/ref_results/network_benchmarks_indices.py +++ b/data/ref_results/network_benchmarks_indices.py @@ -1,28 +1,27 @@ -import os -import json +from index_calculation import generic_index as get_index +from index_calculation import get_reference from result_accum import result_concat as concat + def iperf_index (): - total_r=0 iperf_dict=concat('../../results/iperf/') - for k,v in iperf_dict.iteritems(): - for i,j in iperf_dict[k].iteritems(): - if i=="3 IPERF result": - for a,b in iperf_dict[k][i].iteritems(): - if a=="2. Bandwidth": - raw_num=iperf_dict[k][i][a]['2. throughput Received (b/s)'] - total_r=total_r+raw_num - - l= len(iperf_dict) + #print iperf_dict + iperf_bm_ref = get_reference('network','iperf_bm','throughput received(b/s)') + + iperf_bm_index= get_index(iperf_dict,'iperf_bm',iperf_bm_ref,'4 IPERF result', '2. Bandwidth','2. throughput Received (b/s)') + + iperf_vm_ref = get_reference('network','iperf_vm','throughput received(b/s)') + iperf_vm_index= get_index(iperf_dict,'iperf_vm',iperf_vm_ref,'4 IPERF result', '2. Bandwidth','2. throughput Received (b/s)') + + iperf_vm_2_ref = get_reference('network','iperf_vm_2','throughput received(b/s)') + iperf_vm_2_index= get_index(iperf_dict,'iperf_vm_2',iperf_vm_2_ref,'4 IPERF result', '2. Bandwidth','2. throughput Received (b/s)') + - with open ('./reference.json') as reference_file: - reference_djson=json.load(reference_file) - iperf_ref_r=reference_djson['network']['iperf']['throughput received(b/s)'] - - - iperf_index_r=float((total_r/l)/iperf_ref_r) + + iperf_index= float(iperf_bm_index+iperf_vm_index+iperf_vm_2_index)/3 + print iperf_index iperf_dict_i={}; - iperf_dict_i['1. Index']=iperf_index_r + iperf_dict_i['1. Index']=iperf_index iperf_dict_i['2. Results']=iperf_dict return iperf_dict_i - + |