Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Teingi committed Dec 29, 2024
1 parent 23e2b62 commit 4ccfdd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/handler/analyzer/analyze_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,16 @@ def __parse_log_lines(self, file_full_path, memory_dict):
if '[MEMORY]' in line or 'MemDump' in line or 'ob_tenant_ctx_allocator' in line:
if '[MEMORY] tenant:' in line:
tenant_id = line.split('tenant:')[1].split(',')[0].strip()
hold_bytes = line.split('hold:')[1].split('rpc_')[0].strip()
rpc_hold_bytes = line.split('rpc_hold:')[1].split('cache_hold')[0].strip()
if 'rpc_' in line:
hold_bytes = line.split('hold:')[1].split('rpc_')[0].strip()
rpc_hold_bytes = line.split('rpc_hold:')[1].split('cache_hold')[0].strip()
tenant_dict['rpc_hold'] = self.__convert_string_bytes_2_int_bytes(rpc_hold_bytes)
else:
hold_bytes = line.split('hold:')[1].split('cache_')[0].strip()
cache_hold_bytes = line.split('cache_hold:')[1].split('cache_used')[0].strip()
cache_used_bytes = line.split('cache_used:')[1].split('cache_item_count')[0].strip()
cache_item_count = line.split('cache_item_count:')[1].strip()
tenant_dict['hold'] = self.__convert_string_bytes_2_int_bytes(hold_bytes)
tenant_dict['rpc_hold'] = self.__convert_string_bytes_2_int_bytes(rpc_hold_bytes)
tenant_dict['cache_hold'] = self.__convert_string_bytes_2_int_bytes(cache_hold_bytes)
tenant_dict['cache_used'] = self.__convert_string_bytes_2_int_bytes(cache_used_bytes)
tenant_dict['cache_item_count'] = self.__convert_string_bytes_2_int_bytes(cache_item_count)
Expand Down
4 changes: 2 additions & 2 deletions src/handler/rca/rca_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def __init__(self, context):
# init input parameters
self.report = None
self.tasks = None
self.context.set_variable("input_parameters", Util.get_option(self.options, "input_parameters"))
self.context.set_variable("env", Util.get_option(self.options, "input_parameters"))
self.context.set_variable("input_parameters", Util.get_option(self.options, "env"))
self.context.set_variable("env", Util.get_option(self.options, "env"))
self.store_dir = Util.get_option(self.options, "store_dir", "./obdiag_rca/")
self.context.set_variable("store_dir", self.store_dir)
self.stdio.verbose(
Expand Down

0 comments on commit 4ccfdd4

Please sign in to comment.