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/storage_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/storage_suite.py')
-rw-r--r-- | data/ref_results/storage_suite.py | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/data/ref_results/storage_suite.py b/data/ref_results/storage_suite.py index 0c5b4c66..5c1a89a2 100644 --- a/data/ref_results/storage_suite.py +++ b/data/ref_results/storage_suite.py @@ -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) |