-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
11 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,4 @@ const PLUS_MINUS = '±' | |
const PREFIXES = { | ||
diff: getArrow, | ||
deviation: getPlusMinus, | ||
variance: getPlusMinus, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
// Statistics are now shown if: | ||
// - undefined (e.g. `diff` with no previous benchmark) | ||
// - deviation|variance if not enough samples | ||
// - deviation if not enough samples | ||
export const shouldSkipStat = function({ stat, name, loops }) { | ||
return ( | ||
stat === undefined || | ||
(DEVIATION_STATS.includes(name) && shouldSkipDeviation(stat, loops)) | ||
(name === 'deviation' && shouldSkipDeviation(stat, loops)) | ||
) | ||
} | ||
|
||
const shouldSkipDeviation = function(stat, loops) { | ||
return stat === 0 || loops < MIN_LOOPS | ||
} | ||
|
||
const DEVIATION_STATS = ['deviation', 'variance'] | ||
const MIN_LOOPS = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters