Use --revert-pattern to discount proactive restarts

This commit is contained in:
Eric Lin
2024-01-14 13:32:27 +00:00
parent 1002df5e13
commit c225435bea
2 changed files with 7 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ func (e *logCounter) Count() (count int, err error) {
if len(e.buffer.Match(e.pattern)) != 0 {
count++
}
if len(e.buffer.Match(e.revertPattern)) != 0 {
if e.revertPattern != "" && len(e.buffer.Match(e.revertPattern)) != 0 {
count--
}
case <-e.clock.After(timeout):