Skip to content
Myr

Add categories to benchmark

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent cb5a487 · Browse files · 2 files+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−0 removed

  • tests:+5 added−0 removed
  • other:+4 added−0 removed

2 files+9 added−0 removed

modified:test/benchmark+5 added
58 unmodified lines
59 })60 .on('cycle', function (event) {61 var name = event.target.name.padEnd('nanoid/non-secure'.length)62 var hz = formatNumber(event.target.hz.toFixed(0)).padStart(9)63 if (event.target.name === 'uid') {64 name = '\nAsync:\n' + name65 } else if (event.target.name === 'rndm') {66 name = '\nNon-secure:\n' + name67 }68 process.stdout.write(name + ' ' + chalk.bold(hz) + ' ops/sec\n')69 })70 .run()
modified:README.md+4 added
83 unmodified lines
84nanoid/generate 352,418 ops/sec85uid.sync 332,502 ops/sec86uuid/v4 345,867 ops/sec87shortid 34,193 ops/sec8889Async:90uid 78,343 ops/sec91nanoid/async 79,173 ops/sec9293Non-secure:94rndm 2,557,778 ops/sec95nanoid/non-secure 2,578,934 ops/sec96```97
147 unmodified lines