diff options
author | 2016-09-23 11:38:35 +0800 | |
---|---|---|
committer | 2016-09-25 10:56:22 +0800 | |
commit | 2b172eef7185382ed4283d1868896626ae3ef5f1 (patch) | |
tree | 7242ad699db6876264c9ac60f36763cc47f04ad1 /benchmarks/playbooks/result_transform/ubench_transform.py | |
parent | c806bbde071596f204782e7182a65173798ad3ca (diff) |
Change result keys to lower-case and remove ' .'
QTIP-93
Change-Id: I125163e05b49d9631838e89571d59a967252292e
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'benchmarks/playbooks/result_transform/ubench_transform.py')
-rw-r--r-- | benchmarks/playbooks/result_transform/ubench_transform.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/benchmarks/playbooks/result_transform/ubench_transform.py b/benchmarks/playbooks/result_transform/ubench_transform.py index 3c8ba1d8..ab5fe171 100644 --- a/benchmarks/playbooks/result_transform/ubench_transform.py +++ b/benchmarks/playbooks/result_transform/ubench_transform.py @@ -13,20 +13,18 @@ cpu_2 = os.popen( "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==2'").read().rstrip() -Index_1 = os.popen( +index_1 = os.popen( "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==1'").read().rstrip() -Index_2 = os.popen( +index_2 = os.popen( "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==2'").read().rstrip() -result = {} -result['1.Number of CPU(s) in system'] = total_cpu -result['2.Single CPU test'] = {} -result['2.Single CPU test']['1.Number of parallell test(s)'] = cpu_1 -result['2.Single CPU test']['2.Index score'] = Index_1 -result['3.Multi CPU test'] = {} -result['3.Multi CPU test']['1.Number of parallell test(s)'] = cpu_2 -result['3.Multi CPU test']['2.Index score'] = Index_2 +result = {"n_cpu": total_cpu, + "single": {"n_para_test": cpu_1, + "score": index_1}, + "multi": {"n_para_test": cpu_2, + "score": index_2} + } with open('result_temp', 'w+') as result_file: pickle.dump(result, result_file) |