Skip to content

Commit

Permalink
checkup: Add fail logic
Browse files Browse the repository at this point in the history
The checkup will now fail if the oslat Maximum latency measured exceeded
the oslatLatencyThreshold, and issue the appropriate failure reason.

Signed-off-by: Ram Lavi <[email protected]>
  • Loading branch information
RamLavi committed Dec 14, 2023
1 parent 433ce22 commit c3f195d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/internal/checkup/checkup.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func (c *Checkup) Run(ctx context.Context, oslatLatencyThreshold time.Duration)
return err
}

if c.results.OslatMaxLatency > oslatLatencyThreshold {
return fmt.Errorf("oslat Max Latency measured %s exceeded the given threshold %s",
c.results.OslatMaxLatency.String(), oslatLatencyThreshold.String())
}
return nil
}

Expand Down

0 comments on commit c3f195d

Please sign in to comment.