From 6bfa54e98b06fdd3daf9d26f9a66545402e9252c Mon Sep 17 00:00:00 2001 From: Nauman Ahad Date: Fri, 29 Jan 2016 12:48:00 +0000 Subject: Test_case name included in final json result file Change-Id: Ic4059dd58d2c5c4e9f8a00a1c419dce0994bc1bc Signed-off-by: Nauman Ahad --- benchmarks/playbooks/dhrystone.yaml | 2 +- benchmarks/playbooks/dpi.yaml | 2 +- benchmarks/playbooks/fio.yaml | 2 +- benchmarks/playbooks/iperf.yaml | 4 ++-- benchmarks/playbooks/ramspeed.yaml | 2 +- benchmarks/playbooks/result_transform/final_report.py | 8 +++++--- benchmarks/playbooks/ssl.yaml | 2 +- benchmarks/playbooks/whetstone.yaml | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) (limited to 'benchmarks/playbooks') diff --git a/benchmarks/playbooks/dhrystone.yaml b/benchmarks/playbooks/dhrystone.yaml index 3c1c7fb2..d6306be4 100644 --- a/benchmarks/playbooks/dhrystone.yaml +++ b/benchmarks/playbooks/dhrystone.yaml @@ -45,7 +45,7 @@ - name: copying consolidated report script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result/ - name: making consolidated report - shell: cd $HOME/qtip_result && python final_report.py Dhrystone + shell: cd $HOME/qtip_result && python final_report.py Dhrystone {{fname}} - name: making directory file: path={{home_dir.stdout}}/qtip_result/log state=directory - name: copying result to temp directory diff --git a/benchmarks/playbooks/dpi.yaml b/benchmarks/playbooks/dpi.yaml index e4b7a0fc..6b24fae6 100644 --- a/benchmarks/playbooks/dpi.yaml +++ b/benchmarks/playbooks/dpi.yaml @@ -56,7 +56,7 @@ - name: copy report formation script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result - name: consolidating report - shell: cd $HOME/qtip_result && python final_report.py DPI + shell: cd $HOME/qtip_result && python final_report.py DPI {{fname}} - name: registering files shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy diff --git a/benchmarks/playbooks/fio.yaml b/benchmarks/playbooks/fio.yaml index dc11e9ad..12359656 100644 --- a/benchmarks/playbooks/fio.yaml +++ b/benchmarks/playbooks/fio.yaml @@ -50,7 +50,7 @@ - name: copy report formation script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result - name: consolidating report - shell: cd $HOME/qtip_result && python final_report.py FIO + shell: cd $HOME/qtip_result && python final_report.py FIO {{fname}} - name: registering files shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy diff --git a/benchmarks/playbooks/iperf.yaml b/benchmarks/playbooks/iperf.yaml index ce2ffb6d..d67884f4 100644 --- a/benchmarks/playbooks/iperf.yaml +++ b/benchmarks/playbooks/iperf.yaml @@ -85,7 +85,7 @@ copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result when: rolename =="2-host" and "{{ip2}}" == '' - name: consolidating report - shell: cd $HOME/qtip_result && python final_report.py IPERF + shell: cd $HOME/qtip_result && python final_report.py IPERF {{fname}} when: rolename =="2-host" and "{{ip2}}" == '' - name: Files to Copy shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 @@ -124,4 +124,4 @@ shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json when: rolename == "2-host" - name: removing iperf_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp \ No newline at end of file + shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp diff --git a/benchmarks/playbooks/ramspeed.yaml b/benchmarks/playbooks/ramspeed.yaml index 0810946a..4bbb6151 100644 --- a/benchmarks/playbooks/ramspeed.yaml +++ b/benchmarks/playbooks/ramspeed.yaml @@ -50,7 +50,7 @@ - name: copy report formation script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result - name: consolidating report - shell: cd $HOME/qtip_result && python final_report.py RamSpeed + shell: cd $HOME/qtip_result && python final_report.py RamSpeed {{fname}} - name: registering files shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy diff --git a/benchmarks/playbooks/result_transform/final_report.py b/benchmarks/playbooks/result_transform/final_report.py index 576109bf..6a10c026 100644 --- a/benchmarks/playbooks/result_transform/final_report.py +++ b/benchmarks/playbooks/result_transform/final_report.py @@ -13,11 +13,13 @@ with open('./result_temp', 'r') as result_f: host_name = (os.popen("hostname").read().rstrip()) benchmark_name = str(sys.argv[1]) +testcase_name = str(sys.argv[2]) 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 +final_dict['1 Testcase Name'] = testcase_name +final_dict['2 Time of Report'] = report_time_stamp +final_dict['3 System Information'] = sys_info_dict +final_dict['4 ' + benchmark_name + ' result'] = result_dict with open('./' + host_name + '-' + report_time_stamp + '.json', 'w+') as result_json: json.dump(final_dict, result_json, indent=4, sort_keys=True) diff --git a/benchmarks/playbooks/ssl.yaml b/benchmarks/playbooks/ssl.yaml index 9ba16455..fe8cbfeb 100644 --- a/benchmarks/playbooks/ssl.yaml +++ b/benchmarks/playbooks/ssl.yaml @@ -50,7 +50,7 @@ - name: copy report formation script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result - name: consolidating report - shell: cd $HOME/qtip_result && python final_report.py SSL + shell: cd $HOME/qtip_result && python final_report.py SSL {{fname}} - name: registering files shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy diff --git a/benchmarks/playbooks/whetstone.yaml b/benchmarks/playbooks/whetstone.yaml index 7f062264..ab9290e6 100644 --- a/benchmarks/playbooks/whetstone.yaml +++ b/benchmarks/playbooks/whetstone.yaml @@ -46,7 +46,7 @@ - name: copying consolidated report script copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result/ - name: making consolidated report - shell: cd $HOME/qtip_result && python final_report.py Whetstone + shell: cd $HOME/qtip_result && python final_report.py Whetstone {{fname}} - name: making directory file: path={{home_dir.stdout}}/qtip_result/log state=directory - name: copying result to temp directory -- cgit 1.2.3-korg