Skip to content

Commit

Permalink
🔧 Relaxing load avg thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
peteclark-ft committed Aug 8, 2018
1 parent 60949c9 commit e7028ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loadavg.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func (lac loadAverageCheckerImpl) Check() (string, error) {
return "", errors.New("Couldn't read cpuinfo data")
}

fiveMinLimit := (1.5 * float64(cpuInfo.NumCPU()))
fifteenMinLimit := (0.9 * float64(cpuInfo.NumCPU()))
fiveMinLimit := (1.8 * float64(cpuInfo.NumCPU()))
fifteenMinLimit := (1.1 * float64(cpuInfo.NumCPU()))

if l.Last5Min > fiveMinLimit || l.Last15Min > fifteenMinLimit {
return fmt.Sprintf("Last5Min: %2.2f, Last15Min: %2.2f", l.Last5Min, l.Last15Min), fmt.Errorf("Load avg is above the recommended threshold: Last5Min: %2.2f, Last15Min: %2.2f", l.Last5Min, l.Last15Min)
Expand Down

0 comments on commit e7028ac

Please sign in to comment.