From cc77beef14165845ce4d9c94238a9cc701828039 Mon Sep 17 00:00:00 2001 From: sunpeng <35529415+oraclebird@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:24:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20obdiag=E5=AE=9E=E7=8E=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E3=80=81=E5=8F=98=E9=87=8F=E9=87=87=E9=9B=86=E5=92=8C?= =?UTF-8?q?=E6=AF=94=E5=AF=B9=E5=8A=9F=E8=83=BD=20(#336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * obdiag gather and analyze parameters/variables * obdiag gather and analyze parameters/variables * obdiag gather and analyze parameters/variables * obdiag gather and analyze parameters/variables * CSV添加表头 * obdiag gather and analyze parameters/variables * 添加文件有效性验证 * 添加文件有效性验证 * 修改参数范围表述 * 修改重复项和描述 * 变量分析中采集时间显示BUG修复 --- handler/analyzer/analyze_parameter.py | 4 ++++ handler/analyzer/analyze_variable.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/handler/analyzer/analyze_parameter.py b/handler/analyzer/analyze_parameter.py index a31ebd38..8dfa344c 100644 --- a/handler/analyzer/analyze_parameter.py +++ b/handler/analyzer/analyze_parameter.py @@ -180,6 +180,8 @@ def analyze_parameter_default(self): with open(self.parameter_file_name, 'r', newline='') as file: reader = csv.reader(file) for row in reader: + if row[0] == 'VERSION': + continue key = str(row[1]) + '-' + str(row[2]) + '-' + str(row[3]) + '-' + str(row[4]) + '-' + str(row[5]) + '-' + str(row[6]) value = row[7] file_parameter_dict[key] = value @@ -211,6 +213,8 @@ def alalyze_parameter_diff(self): with open(self.parameter_file_name, 'r', newline='') as file: reader = csv.reader(file) for row in reader: + if row[0] == 'VERSION': + continue parameter_info.append(row) tenants_dict = dict() for row in parameter_info: diff --git a/handler/analyzer/analyze_variable.py b/handler/analyzer/analyze_variable.py index 7eafccb9..ca07ede4 100644 --- a/handler/analyzer/analyze_variable.py +++ b/handler/analyzer/analyze_variable.py @@ -118,6 +118,8 @@ def analyze_variable(self): with open(self.variable_file_name, 'r', newline='') as file: reader = csv.reader(file) for row in reader: + if row[0] == 'VERSION': + continue key = str(row[1]) + '-' + str(row[3]) file_variable_dict[key] = str(row[5]) if not last_gather_time: