From e51df601fe4a1bd22274e3da62659b1ed7b2c49b Mon Sep 17 00:00:00 2001 From: Mofassir Arif Date: Wed, 9 Dec 2015 04:50:55 -0800 Subject: Networking Testcase: Iperf Implemented The ansible playbooks as well as the config files for the iperf throughput testing have been implemented. Some changes have been made to the driver function for the benchmarks. ansible now gets passed a json file. Change-Id: Ibf4c0210ab9f6cbf9896ca69bf2fb6bda8a9925d Signed-off-by: Mofassir Arif --- .../playbooks/result_transform/dpi/dpi_transform.py | 4 ++++ .../playbooks/result_transform/dpi/final_report.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 benchmarks/playbooks/result_transform/dpi/final_report.py (limited to 'benchmarks/playbooks/result_transform/dpi') diff --git a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py index 89e4f187..2aa45757 100644 --- a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py +++ b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py @@ -47,4 +47,8 @@ result['DPI_benchmark(M pps)'] = round(dpi_result_pps, 3) result['DPI_benchmark(Gb/s)'] = round(dpi_result_bps, 3) with open('./result_temp', 'w+') as result_file: pickle.dump(result, result_file) +<<<<<<< HEAD +======= +print json.dumps(result, indent=4, sort_keys=True) +>>>>>>> 5a7dcc0... Networking testcases for QTIP Framework diff --git a/benchmarks/playbooks/result_transform/dpi/final_report.py b/benchmarks/playbooks/result_transform/dpi/final_report.py new file mode 100644 index 00000000..be25daa8 --- /dev/null +++ b/benchmarks/playbooks/result_transform/dpi/final_report.py @@ -0,0 +1,20 @@ +import pickle +import json +import datetime +import sys + +with open('/root/qtip_result/sys_info_temp', 'r') as sys_info_f: + sys_info_dict = pickle.load(sys_info_f) +with open('/root/qtip_result/result_temp', 'r') as result_f: + result_dict = pickle.load(result_f) + +host_name = sys_info_dict['1_Hostname'] +benchmark_name = str(sys.argv[1]) +report_time_stamp = str(datetime.datetime.utcnow().isoformat()) +final_dict = {} +final_dict['1 Time of Report'] = report_time_stamp +final_dict['2 System Information'] = sys_info_dict +final_dict['3 ' + benchmark_name + ' result'] = result_dict + +with open('/root/qtip_result/' + host_name + '-' + report_time_stamp + '.json', 'w+') as result_json: + json.dump(final_dict, result_json, indent=4, sort_keys=True) -- cgit 1.2.3-korg