diff options
author | Nauman_Ahad <Nauman_Ahad@dell.com> | 2016-01-12 14:47:37 +0500 |
---|---|---|
committer | Nauman_Ahad <Nauman_Ahad@dell.com> | 2016-01-12 14:47:37 +0500 |
commit | 90eb79018b459c1aa6606168f1ee592da535643c (patch) | |
tree | fe711256b5767919e1b3cae1051ce58052bcfac2 /data/ref_results/compute_benchmarks_indices.py | |
parent | 3ba92560b96e59a4e93a03f2e42a000778536905 (diff) |
Include Ramspeed Index calulcation
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>
Diffstat (limited to 'data/ref_results/compute_benchmarks_indices.py')
-rw-r--r-- | data/ref_results/compute_benchmarks_indices.py | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/data/ref_results/compute_benchmarks_indices.py b/data/ref_results/compute_benchmarks_indices.py index 305b6b02..1e6922ec 100644 --- a/data/ref_results/compute_benchmarks_indices.py +++ b/data/ref_results/compute_benchmarks_indices.py @@ -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 |