From fa1ced881222d3ce977e8ed2adabf2f9bc5c2ff8 Mon Sep 17 00:00:00 2001 From: jingyd66 <1071948456@qq.com> Date: Thu, 5 Sep 2024 15:30:36 +0800 Subject: [PATCH] update09051530 --- diag_cmd.py | 10 +++++----- handler/analyzer/analyze_queue.py | 11 ++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/diag_cmd.py b/diag_cmd.py index 01c21595..e55d50fd 100644 --- a/diag_cmd.py +++ b/diag_cmd.py @@ -679,11 +679,11 @@ def init(self, cmd, args): return self def _do_command(self, obdiag): - offline_args_sign = '--files' - if self.args and (offline_args_sign in self.args): - return obdiag.analyze_fuction('analyze_log_offline', self.opts) - else: - return obdiag.analyze_fuction('analyze_log', self.opts) + # offline_args_sign = '--files' + # if self.args and (offline_args_sign in self.args): + # return obdiag.analyze_fuction('analyze_log_offline', self.opts) + # else: + return obdiag.analyze_fuction('analyze_queue', self.opts) class ObdiagAnalyzeFltTraceCommand(ObdiagOriginCommand): diff --git a/handler/analyzer/analyze_queue.py b/handler/analyzer/analyze_queue.py index 2ad301aa..9a958da8 100644 --- a/handler/analyzer/analyze_queue.py +++ b/handler/analyzer/analyze_queue.py @@ -192,7 +192,8 @@ def handle_from_node(node): for node in self.nodes: handle_from_node(node) - return analyze_tuples + # return analyze_tuples + self.stdio.print(analyze_tuples) # self.stdio.start_loading('analyze result start') # title, field_names, summary_list, summary_details_list = self.__get_overall_summary(analyze_tuples, self.directly_analyze_files) # table = tabulate.tabulate(summary_list, headers=field_names, tablefmt="grid", showindex=False) @@ -257,8 +258,12 @@ def __handle_from_node(self, node, local_store_parent_dir): self.stdio.print(node_results) count, max_queue_value = self.count_and_find_max_queues(node_results, queue_limit) result_dict['tenant_name'] = self.tenant - result_dict['over_quene_limit'] = count - result_dict['max_quene'] = max_queue_value + if max_queue_value > queue_limit: + result_dict['is_queue'] = 'yes' + else: + result_dict['is_queue'] = 'no' + result_dict['over_queue_limit'] = count + result_dict['max_queue'] = max_queue_value return result_dict def count_and_find_max_queues(data, queue_limit):