From 8554f3eba7a5f2ae1c6d04794cd3da8ffc065a2f Mon Sep 17 00:00:00 2001 From: naiba Date: Sat, 28 Dec 2024 00:29:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0=E9=87=87?= =?UTF-8?q?=E6=A0=B7=E4=B8=8D=E8=B6=B3=E5=AF=BC=E8=87=B4=E7=9A=84=E5=91=8A?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/alertrule.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/alertrule.go b/model/alertrule.go index ea1809a..c2ac896 100644 --- a/model/alertrule.go +++ b/model/alertrule.go @@ -98,6 +98,8 @@ func (r *AlertRule) Check(points [][]bool) (maxDuration int, passed bool) { continue } if len(points) < duration { + // 如果采样点数量不足 则认为检查通过 + hasPassedRule = true continue } total, fail := 0.0, 0.0