Skip to content

Commit

Permalink
Do not step when mean 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 5, 2021
1 parent a8301b0 commit e84bbe2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/run/measure/remaining.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { hasMaxMeasures } from '../sample/max_measures.js'
// - Until a specific `rmoe` (as defined by `precision`) has been reached
// otherwise
// We always wait for calibration, except with the `dev` command.
// `median: 0`:
// `mean: 0`:
// - Should very rarely happen after calibration since it requires all of:
// - Very important change of performance between samples
// - Task real median is very close to time resolution
// - Task real mean is very close to time resolution
// - The `repeat` logic is failing to correct it
// - We never stop measuring since `median: 0` is not useful and should not be
// - We never stop measuring since `mean: 0` is not useful and should not be
// saved nor reported (including in previews)
// Measuring is interrupted when:
// - User manually stopped it
Expand All @@ -25,7 +25,7 @@ import { hasMaxMeasures } from '../sample/max_measures.js'
// - Any timeout might trigger or not depending on the machine speed, which
// means a benchmark might succeed or not depending on the machine.
export const isRemainingCombination = function (
{ sampleState: { allSamples, measures }, stats: { median, loops, rmoe } },
{ sampleState: { allSamples, measures }, stats: { mean, loops, rmoe } },
{ precisionTarget, stage, stopState: { stopped } },
) {
if (stopped) {
Expand All @@ -36,7 +36,7 @@ export const isRemainingCombination = function (
return allSamples === 0
}

if (median === 0) {
if (mean === 0) {
return true
}

Expand Down

0 comments on commit e84bbe2

Please sign in to comment.