From 99bf6228b8ec631b59706c3f25ab21df4b10d964 Mon Sep 17 00:00:00 2001 From: wuhuanzhou Date: Sun, 7 Feb 2021 15:30:25 +0800 Subject: [PATCH] op benchmark ci retry with specfied id (#30743) * op benchmark ci retry with specfied id, notest, test=op_benchmark * fix parse case name with case id, notest, test=op_benchmark * remove test code, test=develop --- tools/check_op_benchmark_result.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/check_op_benchmark_result.py b/tools/check_op_benchmark_result.py index 9253604c92..e45d12c7b1 100644 --- a/tools/check_op_benchmark_result.py +++ b/tools/check_op_benchmark_result.py @@ -30,7 +30,7 @@ def parse_case_name(log_file_name): case_id, case_info = log_file_name.split("-") direction = case_info.split(".")[0].split("_")[-1] - return "%s(%s)" % (case_id, direction) + return "%s (%s)" % (case_id, direction) def parse_log_file(log_file): @@ -127,15 +127,18 @@ def update_api_info_file(fail_case_list, api_info_file): check_path_exists(api_info_file) # set of case names for performance check failures - fail_case_set = set(map(lambda x: x.rsplit('_', 1)[0], fail_case_list)) + parse_case_id_f = lambda x: x.split()[0].rsplit('_', 1) + fail_case_dict = dict(map(parse_case_id_f, fail_case_list)) # list of api infos for performance check failures api_info_list = list() with open(api_info_file) as f: for line in f: - case = line.split(',')[0] - if case in fail_case_set: - api_info_list.append(line) + line_list = line.split(',') + case = line_list[0].split(':')[0] + if case in fail_case_dict: + line_list[0] = "%s:%s" % (case, fail_case_dict[case]) + api_info_list.append(','.join(line_list)) # update api info file with open(api_info_file, 'w') as f: -- GitLab