Skip to content

Commit

Permalink
Format benchmark results
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Oct 7, 2021
1 parent 4a6a70c commit 22dabc8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bench/index.js
Expand Up @@ -11,13 +11,13 @@ const test = (c) =>
c.red(`${c.bold(`${c.cyan(`${c.yellow("yellow")}cyan`)}`)}red`)

new bench.Suite()
.add("chalk", () => test(chalk))
.add("kleur", () => test(kleur))
.add("colors", () => test(colors))
.add("ansi-colors", () => test(ansicolors))
.add("picocolors", () => test(picocolors))
.add("colorette", () => test(colorette))
.add(" chalk ", () => test(chalk))
.add(" kleur ", () => test(kleur))
.add(" colors ", () => test(colors))
.add(" ansi-colors ", () => test(ansicolors))
.add(" picocolors ", () => test(picocolors))
.add("+ colorette ", () => test(colorette))
.on("cycle", ({ target: { name, hz } }) =>
console.log(`${name} × ${Math.floor(hz).toLocaleString()} op/s`)
console.log(name, `${Math.floor(hz).toLocaleString()} ops/sec`.padStart(18))
)
.run()

0 comments on commit 22dabc8

Please sign in to comment.