Skip to content

Commit

Permalink
Add fastest and slowest to benchmark
Browse files Browse the repository at this point in the history
- Add fastest and slowest to benchmarks
- upgrade packages
  • Loading branch information
woss committed Apr 13, 2024
1 parent 60204ad commit 368ff0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
8 changes: 7 additions & 1 deletion benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ suite.add('hyperid - fixed length, url safe', function () {

suite.on('cycle', cycle)

suite.run()
suite.on('complete', function () {
console.log('\n')
console.log(`Fastest is ${this.filter('fastest').map('name')}`)
console.log(`Slowest is ${this.filter('slowest').map('name')}`)
})

suite.run({ async: true })

function cycle (e) {
console.log(e.target.toString())
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@
},
"homepage": "https://github.com/mcollina/hyperid#readme",
"devDependencies": {
"@napi-rs/uuid": "^0.1.0",
"@napi-rs/uuid": "^0.2.0",
"benchmark": "^2.1.4",
"bloomfilter": "0.0.18",
"bloomfilter": "^0.0.18",
"hashids": "^2.2.8",
"nanoid": "^3.1.20",
"nid": "^1.1.0",
"nanoid": "^3.0.0",
"nid": "^2.0.1",
"pre-commit": "^1.2.2",
"shortid": "^2.2.15",
"standard": "^16.0.3",
"proxyquire": "^2.1.3",
"shortid": "^2.2.16",
"standard": "^17.1.0",
"tap-dot": "^2.0.0",
"tape": "^5.0.0",
"typescript": "^4.3.4",
"proxyquire": "^2.1.3"
"typescript": "^5.4.5"
},
"dependencies": {
"buffer": "^5.2.1",
"uuid": "^8.3.2",
"uuid-parse": "^1.1.0",
"buffer": "^5.2.1"
"uuid-parse": "^1.1.0"
},
"browser": {
"./uuid-node.js": "./uuid-browser.js"
Expand Down

0 comments on commit 368ff0a

Please sign in to comment.