From c34a4f884d5354693b1df2604e6c742e3e4816c4 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 27 Jun 2025 18:21:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3KP=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E7=99=BE=E5=88=86=E6=AF=94=E5=80=BC=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E9=99=90=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/pm/performance.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/features/pm/performance.go b/features/pm/performance.go index 42351e7b..0a779084 100644 --- a/features/pm/performance.go +++ b/features/pm/performance.go @@ -240,6 +240,12 @@ func saveKPIDataC(kpiReport KpiReport, index int64) int64 { item["value"] = 0 item["err"] = err.Error() } else { + if *v.Unit == "%" && result > 100 { + result = 100 + } + if *v.Unit == "%" && result < 0 { + result = 0 + } item["value"] = result } KpiValues = append(KpiValues, item)