diff options
author | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-07-16 21:15:11 +0800 |
---|---|---|
committer | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-07-16 21:15:11 +0800 |
commit | 481f78bf7a08e31ee53270028fa70b9eb60ff0a3 (patch) | |
tree | 629ac721a5fa3b18180e3fd7152acfa8795b50d4 /data/ref_results/compute_suite.py | |
parent | acd405c3199a03ae58844a6c6f0e5595fb877da3 (diff) |
Fix pep8 errors for all the others python files.
JIRA:QTIP-89
Change-Id: Ida1936dea3bcab6137d039fc2d21dc4df60d9f77
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'data/ref_results/compute_suite.py')
-rw-r--r-- | data/ref_results/compute_suite.py | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/data/ref_results/compute_suite.py b/data/ref_results/compute_suite.py index 86e8a877..bcaf83c8 100644 --- a/data/ref_results/compute_suite.py +++ b/data/ref_results/compute_suite.py @@ -2,56 +2,49 @@ import json import compute_benchmarks_indices as benchmark_indices -compute_dict={}; - +compute_dict = {} try: - compute_dict['DPI']=benchmark_indices.dpi_index() -except OSError: + compute_dict['DPI'] = benchmark_indices.dpi_index() +except OSError: pass - - try: - compute_dict['Dhrystone']=benchmark_indices.dhrystone_index() + compute_dict['Dhrystone'] = benchmark_indices.dhrystone_index() except OSError: pass - - try: - compute_dict['Whetstone']=benchmark_indices.whetstone_index() + compute_dict['Whetstone'] = benchmark_indices.whetstone_index() except OSError: pass try: - compute_dict['SSL']=benchmark_indices.ssl_index() + compute_dict['SSL'] = benchmark_indices.ssl_index() except OSError: pass try: - compute_dict['RamSpeed']=benchmark_indices.ramspeed_index() + compute_dict['RamSpeed'] = benchmark_indices.ramspeed_index() except OSError: pass +compute_bench_list = ['DPI', 'Dhrystone', 'Whetstone', 'SSL', 'RamSpeed'] +l = len(compute_bench_list) -compute_bench_list=['DPI','Dhrystone','Whetstone','SSL','RamSpeed'] -l=len(compute_bench_list) - -temp=0 +temp = 0 for benchmark in compute_bench_list: try: - temp=temp+float(compute_dict[benchmark]['1. Index']) + temp = temp + float(compute_dict[benchmark]['1. Index']) except KeyError: - l=l-1 + 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 + 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) - |