Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 9, 2022
1 parent b6d800b commit 56c9bd0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/history/compare/limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import { UserError } from '../../error/main.js'
// during measuring (`run` command). It is not intended to be shown in
// reporting. Instead, `showDiff` should be used for similar reporting-focused
// purposes.
// Even when a limit is hit, we still `save` (if the flag is present):
// - This avoids losing information, e.g.:
// - We can make a silent `run` checking only for limits, and still `show`
// the result afterwards if the limit is hit
// - We can fail a CI job if a limit is hit, while still `show`ing the
// result afterwards
// - This makes `limit` orthogonal with `save`
// - If a limit is hit, it fails only once, not repeatedly, since the new
// result will adjust the value
// The `limit` can check either for increase or decrease depending on whether
// its percentage is positive or not. This is because:
// - A decrease percentage is the inverse from an increase percentage
Expand Down

0 comments on commit 56c9bd0

Please sign in to comment.