summaryrefslogtreecommitdiffstats
path: root/data/ref_results/compute_suite.py
diff options
context:
space:
mode:
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-10-07 13:12:39 +0800
committerzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-10-13 09:28:16 +0800
commitf7b4e61fcc20c5814d9b7ed5ebefbec1b549cd03 (patch)
treeb912b940397d6d570cb4865d7c54b20b41e173e7 /data/ref_results/compute_suite.py
parent2dda7f90927934bc5738287b2f8960a4d14bb07e (diff)
Refactor pushing suite result to test db
modification: remove compute_suite.py,network_suite.py,storage_suite.py handler all suite result in suite_result.py refactor pushtoDB.py so that it can be called by qtip_server JIRA:QTIP-99 Change-Id: I1630a512c22cba7be038f5301f1454b8ef4f762f 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.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/data/ref_results/compute_suite.py b/data/ref_results/compute_suite.py
deleted file mode 100644
index 7154183c..00000000
--- a/data/ref_results/compute_suite.py
+++ /dev/null
@@ -1,50 +0,0 @@
-import json
-import compute_benchmarks_indices as benchmark_indices
-
-
-compute_dict = {}
-try:
- compute_dict['DPI'] = benchmark_indices.dpi_index()
-except OSError:
- pass
-
-try:
- compute_dict['Dhrystone'] = benchmark_indices.dhrystone_index()
-except OSError:
- pass
-
-try:
- compute_dict['Whetstone'] = benchmark_indices.whetstone_index()
-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:
- try:
- temp = temp + float(compute_dict[benchmark]['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)