Skip to content

Commit

Permalink
fixes perfectionist/sort-imports error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDroomer committed Jun 24, 2024
1 parent 03b5f97 commit 85b4268
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import { v4 as lukeed4 } from '@lukeed/uuid'
import { v4 as napiV4 } from '@napi-rs/uuid'
import { Bench } from 'tinybench'
import crypto from 'node:crypto'
import { styleText } from 'node:util'
import rndm from 'rndm'
import srs from 'secure-random-string'
import shortid from 'shortid'
import { Bench } from 'tinybench'
import { uid } from 'uid'
import uidSafe from 'uid-safe'
import { uid as uidSecure } from 'uid/secure'
Expand Down Expand Up @@ -71,16 +71,16 @@ bench
rndm(21)
})

bench.addEventListener('cycle', event => {
let name = event.task.name.padEnd('async secure-random-string'.length)
let hz = formatNumber(event.task.result.hz.toFixed(0)).padStart(10)
if (event.task.name === 'uid') {
name = '\nNon-secure:\n' + name
}
process.stdout.write(
`${name}${styleText('bold', hz)}${styleText('dim', ' ops/sec')}\n`
)
})
bench.addEventListener('cycle', event => {
let name = event.task.name.padEnd('async secure-random-string'.length)
let hz = formatNumber(event.task.result.hz.toFixed(0)).padStart(10)
if (event.task.name === 'uid') {
name = '\nNon-secure:\n' + name
}
process.stdout.write(
`${name}${styleText('bold', hz)}${styleText('dim', ' ops/sec')}\n`
)
})

await bench.warmup()
await bench.run()
await bench.warmup()
await bench.run()

0 comments on commit 85b4268

Please sign in to comment.