diff options
author | Nauman_Ahad <Nauman_Ahad@dell.com> | 2015-11-09 11:59:54 +0500 |
---|---|---|
committer | Nauman_Ahad <Nauman_Ahad@dell.com> | 2015-11-09 11:59:54 +0500 |
commit | 735123d3a10789e771f621f3a0d8a299903063a0 (patch) | |
tree | 7f76bd653298ff19bad59eb1fd8ec7a643bf90e0 /benchmarks/playbooks/result_transform/ubench_transform.py | |
parent | 95bf8a8c96b2be94512e042f3f3c82edcbebf84d (diff) |
Ansible compute benchmarks playbooks with system Info & result transform
Updated playbooks for SSL,DPI,Dhrystone,Whetstone
Also included python scripts for system information collection(compute
benchmarks) and result transformation into JSON files for the aforementioned
compute benchmarks
JIRA:QTIP-20
JIRA:QTIP-36
JIRA:QTIP-37
JIRA:QTIP-39
JIRA:QTIP-40
JIRA:QTIP-52
Change-Id: I3c099d71d8316c15f0619313bd4f9829a58f6e33
Signed-off-by: Nauman_Ahad <Nauman_Ahad@dell.com>
Diffstat (limited to 'benchmarks/playbooks/result_transform/ubench_transform.py')
-rw-r--r-- | benchmarks/playbooks/result_transform/ubench_transform.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/benchmarks/playbooks/result_transform/ubench_transform.py b/benchmarks/playbooks/result_transform/ubench_transform.py new file mode 100644 index 00000000..f15943d7 --- /dev/null +++ b/benchmarks/playbooks/result_transform/ubench_transform.py @@ -0,0 +1,35 @@ +import os +import json +import pickle +import datetime + +total_cpu = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $1;}' | awk 'NR==1'").read().rstrip() + +cpu_1 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==1'").read().rstrip() + + +cpu_2 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==2'").read().rstrip() + + +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( + "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 + +with open('result_temp', 'w+') as result_file: + pickle.dump(result, result_file) +print json.dumps(result, indent=4, sort_keys=True) +# print result.items() |