wu-sheng commented on code in PR #11336:
URL: https://github.com/apache/skywalking/pull/11336#discussion_r1327257871
##########
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RunningRule.java:
##########
@@ -383,6 +392,14 @@ private boolean isMatch() {
return isMatch == 1;
}
+ public boolean checkOutOfDate(LocalDateTime currentTime) {
+ if (this.lastUpdateTime != null) {
+ int minutes = Minutes.minutesBetween(lastUpdateTime,
currentTime).getMinutes();
+ return minutes > this.period * 10;
+ }
+ return false;
+ }
Review Comment:
If the window of this entity is out of date, shouldn't all `values` are
null? I think it is better compared with this condition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]