Skip to content

Commit

Permalink
Optimization analyze log result presentation (#595)
Browse files Browse the repository at this point in the history
* fixed: gather obstack result file empty check retry adjustment

* Optimization analyze log result presentation
  • Loading branch information
Teingi authored Dec 4, 2024
1 parent 4f8a719 commit 0f0a323
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions handler/analyzer/analyze_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ def __get_overall_summary(node_summary_tuples, is_files=False):
:param node_summary_tuple
:return: a string indicating the overall summary
"""
field_names = ["Node", "Status", "FileName", "ErrorCode", "Message", "Count"]
field_names = ["Node", "Status", "FileName", "First Found Time", "ErrorCode", "Message", "Count"]
t = []
t_details = []
field_names_details = field_names
field_names_details.extend(["Cause", "Solution", "First Found Time", "Last Found Time", "Trace_IDS"])
field_names_details.extend(["Last Found Time", "Cause", "Solution", "Trace_IDS"])
for tup in node_summary_tuples:
is_empty = True
node = tup[0]
Expand All @@ -452,24 +452,24 @@ def __get_overall_summary(node_summary_tuples, is_files=False):
error_code_info = OB_RET_DICT.get(ret_key, "")
if len(error_code_info) > 3:
is_empty = False
t.append([node, "Error:" + tup[2] if is_err else "Completed", ret_value["file_name"], ret_key, error_code_info[1], ret_value["count"]])
t.append([node, "Error:" + tup[2] if is_err else "Completed", ret_value["file_name"], ret_value["first_found_time"], ret_key, error_code_info[1], ret_value["count"]])
t_details.append(
[
node,
"Error:" + tup[2] if is_err else "Completed",
ret_value["file_name"],
ret_value["first_found_time"],
ret_key,
error_code_info[1],
ret_value["count"],
ret_value["last_found_time"],
error_code_info[2],
error_code_info[3],
ret_value["first_found_time"],
ret_value["last_found_time"],
str(ret_value["trace_id_list"]),
]
)
if is_empty:
t.append([node, "PASS", None, None, None, None])
t.append([node, "PASS", None, None, None, None, None])
t_details.append([node, "PASS", None, None, None, None, None, None, None, None, None])
title = "\nAnalyze OceanBase Offline Log Summary:\n" if is_files else "\nAnalyze OceanBase Online Log Summary:\n"
t.sort(key=lambda x: (x[0], x[1], x[2], x[3]), reverse=False)
Expand Down

0 comments on commit 0f0a323

Please sign in to comment.