diff options
author | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-09-23 11:38:35 +0800 |
---|---|---|
committer | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-09-25 10:56:22 +0800 |
commit | 2b172eef7185382ed4283d1868896626ae3ef5f1 (patch) | |
tree | 7242ad699db6876264c9ac60f36763cc47f04ad1 /benchmarks/playbooks/result_transform/dpi | |
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/dpi')
-rw-r--r-- | benchmarks/playbooks/result_transform/dpi/dpi_transform.py | 5 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/dpi/final_report.py | 20 |
2 files changed, 2 insertions, 23 deletions
diff --git a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py index 622030cd..ee29d8e2 100644 --- a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py +++ b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py @@ -41,8 +41,7 @@ os.popen( home_dir = str(os.popen("echo $HOME").read().rstrip()) host = os.popen("echo $HOSTNAME") -result = {} -result['DPI_benchmark(M pps)'] = round(dpi_result_pps, 3) -result['DPI_benchmark(Gb/s)'] = round(dpi_result_bps, 3) +result = {'pps': round(dpi_result_pps, 3), + 'bps': round(dpi_result_bps, 3)} with open('./result_temp', 'w+') as result_file: pickle.dump(result, result_file) diff --git a/benchmarks/playbooks/result_transform/dpi/final_report.py b/benchmarks/playbooks/result_transform/dpi/final_report.py deleted file mode 100644 index be25daa8..00000000 --- a/benchmarks/playbooks/result_transform/dpi/final_report.py +++ /dev/null @@ -1,20 +0,0 @@ -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) |