Skip to content

Commit

Permalink
Merge pull request #27 from rizalgowandy/arwego/feat/v2
Browse files Browse the repository at this point in the history
Add Minimum Latency to Trigger Alert
  • Loading branch information
rizalgowandy authored May 30, 2022
2 parents 624a690 + c587b49 commit 916832c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion job.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (j *Job) Run() {
j.RecordHistory(ctx, start, finish)

// Send alert if high latency is detected.
if latency > maxLatency {
if latency > maxLatency && latency > time.Second {
j.manager.alerter.NotifyHighLatency(ctx, j, prev, next, latency, maxLatency)
}
}
Expand Down
1 change: 0 additions & 1 deletion job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func TestNewJob(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
manager := NewManager()
got := NewJob(manager, tt.args.job, tt.args.waveNumber, tt.args.totalWave)
t.Log(got)
assert.NotNil(t, got)
})
}
Expand Down

0 comments on commit 916832c

Please sign in to comment.