Commit | Line | Data |
---|---|---|
f45b29bf | 1 | import { randomUUID } from 'node:crypto' |
0c01f51c | 2 | |
4676a95c | 3 | import { bench, group, run } from 'tatami-ng' |
f522d7b9 | 4 | import { v4 as uuid } from 'uuid' |
5ae4976a | 5 | |
ab9a08f3 JB |
6 | group('UUIDv4 generator', () => { |
7 | bench('randomUUID', () => { | |
f45b29bf | 8 | randomUUID() |
ab9a08f3 JB |
9 | }) |
10 | bench('uuid', () => { | |
5ae4976a | 11 | uuid() |
5ae4976a | 12 | }) |
ab9a08f3 JB |
13 | }) |
14 | ||
15 | await run({ | |
ebf80fe4 | 16 | units: true, |
ab9a08f3 | 17 | }) |