Skip to content

Commit da13c22

Browse files
committed
fix
1 parent 5a8cd47 commit da13c22

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

benchmarking/compare/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ for (let i = 0; i < results[0].length; i += 1) {
8686
if (min !== 0) {
8787
console.group(`${metric}: fastest is ${char(min_index)} (${branches[min_index]})`);
8888
times.forEach((time, b) => {
89-
console.log(
90-
`${char(b)}: ${'◼'.repeat(Math.round(20 * (time / max)))} (${time.toFixed(2)}ms)`
91-
);
89+
const SIZE = 20;
90+
const n = Math.round(SIZE * (time / max));
91+
92+
console.log(`${char(b)}: ${'◼'.repeat(n)}${' '.repeat(SIZE - n)} ${time.toFixed(2)}ms`);
9293
});
9394
console.groupEnd();
9495
}

0 commit comments

Comments
 (0)