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-14 11:57:11 +0000 |
commit | c02ac0ea76af8011afaf7241e30999326efe8105 (patch) | |
tree | fe711256b5767919e1b3cae1051ce58052bcfac2 /data/ref_results/compute_suite.py | |
parent | 371c8f05ce0c78ba428ef0d0b21228f5e869ac02 (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>
(cherry picked from commit 90eb79018b459c1aa6606168f1ee592da535643c)
Diffstat (limited to 'data/ref_results/compute_suite.py')
-rw-r--r-- | data/ref_results/compute_suite.py | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/data/ref_results/compute_suite.py b/data/ref_results/compute_suite.py index 78eaae6f..ce7f33cd 100644 --- a/data/ref_results/compute_suite.py +++ b/data/ref_results/compute_suite.py @@ -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) |