Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Optimize the log output of obdiag analyze memory #579

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions handler/analyzer/analyze_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def __handle_from_node(self, node, local_store_parent_dir):
if resp["skip"]:
return resp
self.stdio.print(FileUtil.show_file_list_tabulate(remote_ip, log_list, self.stdio))
self.stdio.print("analyze log. Please wait a moment...")
self.stdio.start_loading("analyze memory start")
for log_name in log_list:
if self.directly_analyze_files:
Expand Down Expand Up @@ -567,6 +568,8 @@ def __parse_memory_label(self, file_full_path):
except Exception as e:
self.stdio.warn('parse memory label failed, error: {0}'.format(e))
continue
if len(memory_print_line_list) == 0 and self.directly_analyze_files:
self.stdio.warn('failed to get memory information. Please confirm that the file:{0} and version:{1} you are passing are consistent'.format(file_full_path, self.version))
return sorted(memory_print_line_list)

def __convert_string_bytes_2_int_bytes(self, string_bytes):
Expand Down