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/ssl | |
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/ssl')
-rw-r--r-- | benchmarks/playbooks/result_transform/ssl/ssl_transform.py | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/benchmarks/playbooks/result_transform/ssl/ssl_transform.py b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py new file mode 100644 index 00000000..188eb3d5 --- /dev/null +++ b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py @@ -0,0 +1,67 @@ +import os +import json +import pickle +import datetime + +#total_cpu=os.popen("cat $HOME/tempD/nDPI/example/result.txt | tail -1").read() + +openssl_version = os.popen("cat RSA_dump | head -1").read().rstrip() +rsa_512_sps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $6}' ").read().rstrip() +rsa_512_vps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $7}' ").read().rstrip() +rsa_1024_sps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $6}' ").read().rstrip() +rsa_1024_vps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $7}' ").read().rstrip() +rsa_2048_sps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $6}' ").read().rstrip() +rsa_2048_vps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $7}' ").read().rstrip() +rsa_4096_sps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $6}' ").read().rstrip() +rsa_4096_vps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $7}' ").read().rstrip() + + +aes_16B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $2}' ").read().rstrip() +aes_64B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $3}' ").read().rstrip() +aes_256B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $4}' ").read().rstrip() +aes_1024B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $5}' ").read().rstrip() +aes_8192B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $6}' ").read().rstrip() + + +hostname = os.popen("hostname").read().rstrip() +time_stamp = str(datetime.datetime.utcnow().isoformat()) + + +os.system("mv RSA_dump " + hostname + "-" + time_stamp + ".log") +os.system("cat AES-128-CBC_dump >> " + hostname + "-" + time_stamp + ".log") + + +result = {} + +result['1. Version'] = [openssl_version] +result['2. RSA singatures'] = {} +result['2. RSA singatures']['1. 512 bits (sign/s)'] = [rsa_512_sps] +result['2. RSA singatures']['2. 1024 bits (sign/s)'] = [rsa_1024_sps] +result['2. RSA singatures']['3. 2048 bits (sign/s)'] = [rsa_2048_sps] +result['2. RSA singatures']['4. 4096 bits (sign/s)'] = [rsa_4096_sps] + +result['3. AES-128-cbc throughput'] = {} +result['3. AES-128-cbc throughput']['1. 16 Bytes block (B/sec)'] = [aes_16B] +result['3. AES-128-cbc throughput']['2. 64 Bytes block (B/sec)'] = [aes_64B] +result['3. AES-128-cbc throughput']['3. 256 Bytes block (B/sec)'] = [aes_256B] +result['3. AES-128-cbc throughput']['4. 1024 Bytes block (B/sec)'] = [aes_1024B] +result['3. AES-128-cbc throughput']['5. 16 Bytes block (B/sec)'] = [aes_8192B] + + +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) + + |