Skip to content

Commit

Permalink
fix: refine throughput warning condition
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Oct 4, 2024
1 parent d5d78dd commit 5d19f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reporter/terminal/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function warning(
`${bold(colors, yellow(colors, 'Warning'))}: ${bold(colors, cyan(colors, benchmark.name))} has a non zero latency median absolute deviation: ${red(colors, duration(benchmark.stats.latency.mad))}`
)
}
if (throughput && benchmark.stats.throughput.mad > 0) {
if (throughput && Math.trunc(benchmark.stats.throughput.mad) > 0) {
warnings.push(
`${bold(colors, yellow(colors, 'Warning'))}: ${bold(colors, cyan(colors, benchmark.name))} has a non zero throughput median absolute deviation: ${red(colors, itersPerSecond(benchmark.stats.throughput.mad))}`
)
Expand Down

0 comments on commit 5d19f0a

Please sign in to comment.