Skip to content

Commit e880e5f

Browse files
authored
Merge branch 'main' into reduce-production-dependencies
2 parents c0f3047 + 9b76359 commit e880e5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmarks/report.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ function reportAverages (avg) {
127127
const correctedDiff = unit === 'ms' ? diff * -1 : diff
128128
const sign = correctedDiff > 0 ? '+' : ''
129129
const perc = correctedDiff === 0 ? 100 : `${sign}${correctedDiff.toFixed(2)}`
130-
if (diff > threshold) {
131-
console.error(`\n\nError: ${key} is more than ${sign}${threshold}% off the reference (${ref} ${unit})`)
130+
if ((-1 * correctedDiff) > threshold) {
131+
console.error(`\n\nError: ${key} is ${sign}${correctedDiff.toFixed(2)}% off the reference (${ref} ${unit}) which is more than the threshold of ${threshold}% `)
132132
failed = true
133133
}
134134
console.log(`| ${label} | ${benchmark} | ${config} | ${value.toFixed(0)} | ${unit} | ${perc}%`)

0 commit comments

Comments
 (0)