Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 25, 2024
1 parent 4bc4dd0 commit bacb11b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ bench
rndm(21)
})

let longestTask = bench.tasks.reduce(
(maxLength, task) => Math.max(maxLength, task.name.length), 0
)
let longestTask = bench.tasks.reduce((maxLength, task) => {
return Math.max(maxLength, task.name.length)
}, 0)

bench.addEventListener('cycle', ({ task }) => {
let hz = (+task.result.hz.toFixed(0))
.toLocaleString('en-US')
.padStart(14)
let hz = (+task.result.hz.toFixed(0)).toLocaleString('en-US').padStart(14)

let name = task.name.padEnd(longestTask)
let value = styleText('bold', hz)
Expand Down

0 comments on commit bacb11b

Please sign in to comment.