Skip to content

Commit

Permalink
chore: update benchmark deps and minor fix (#346)
Browse files Browse the repository at this point in the history
* test: fix benchmark output

* chore(bench/gc): update deps

* chore: update deps

---------

Co-authored-by: Alex Potsides <alex@achingbrain.net>
  • Loading branch information
SgtPooki and achingbrain authored Dec 30, 2023
1 parent 9efe50d commit 17e85f9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 45 deletions.
24 changes: 12 additions & 12 deletions benchmarks/add-dir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
"start": "npm run build && node dist/src/index.js"
},
"devDependencies": {
"@chainsafe/libp2p-noise": "^11.0.0",
"@chainsafe/libp2p-yamux": "^3.0.5",
"@chainsafe/libp2p-noise": "^14.1.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@helia/unixfs": "^1.4.0",
"@ipld/dag-pb": "^4.0.2",
"@libp2p/websockets": "^5.0.3",
"aegir": "^39.0.4",
"@libp2p/websockets": "^8.0.9",
"aegir": "^41.3.5",
"blockstore-fs": "^1.0.1",
"datastore-level": "^10.0.1",
"execa": "^7.0.0",
"helia": "^1.0.0",
"execa": "^8.0.1",
"helia": "^2.1.0",
"ipfs-core": "^0.18.0",
"ipfs-unixfs-importer": "^15.1.5",
"ipfsd-ctl": "^13.0.0",
"it-all": "^2.0.0",
"it-drain": "^2.0.0",
"it-map": "^2.0.1",
"kubo": "^0.22.0",
"it-all": "^3.0.4",
"it-drain": "^3.0.5",
"it-map": "^3.0.5",
"kubo": "^0.25.0",
"kubo-rpc-client": "^3.0.1",
"libp2p": "^0.43.0",
"multiformats": "^11.0.1",
"libp2p": "^1.1.0",
"multiformats": "^13.0.0",
"tinybench": "^2.4.0"
}
}
30 changes: 13 additions & 17 deletions benchmarks/gc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,21 @@
"start": "npm run build && node dist/src/index.js"
},
"devDependencies": {
"@chainsafe/libp2p-noise": "^12.0.0",
"@chainsafe/libp2p-yamux": "^4.0.2",
"@ipld/dag-pb": "^4.0.3",
"@libp2p/websockets": "^6.0.1",
"aegir": "^39.0.4",
"blockstore-fs": "^1.0.1",
"datastore-level": "^10.0.1",
"execa": "^7.0.0",
"helia": "^1.0.0",
"@ipld/dag-pb": "^4.0.6",
"aegir": "^41.2.0",
"blockstore-fs": "^1.1.8",
"datastore-level": "^10.1.5",
"execa": "^8.0.1",
"helia": "^2.1.0",
"ipfs-core": "^0.18.0",
"ipfsd-ctl": "^13.0.0",
"it-all": "^3.0.2",
"it-drain": "^3.0.1",
"it-map": "^3.0.3",
"kubo": "^0.22.0",
"kubo-rpc-client": "^3.0.1",
"libp2p": "^0.45.2",
"multiformats": "^11.0.1",
"tinybench": "^2.4.0"
"it-all": "^3.0.4",
"it-drain": "^3.0.5",
"it-map": "^3.0.5",
"kubo": "^0.25.0",
"kubo-rpc-client": "^3.0.2",
"multiformats": "^13.0.0",
"tinybench": "^2.5.1"
},
"private": true
}
20 changes: 5 additions & 15 deletions benchmarks/gc/src/helia.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import os from 'node:os'
import path from 'node:path'
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import * as dagPb from '@ipld/dag-pb'
import { webSockets } from '@libp2p/websockets'
import { FsBlockstore } from 'blockstore-fs'
import { LevelDatastore } from 'datastore-level'
import { createHelia, type DAGWalker } from 'helia'
import all from 'it-all'
import drain from 'it-drain'
import map from 'it-map'
import { createLibp2p } from 'libp2p'
import type { GcBenchmark } from './index.js'

const dagPbWalker: DAGWalker = {
Expand All @@ -28,17 +24,11 @@ export async function createHeliaBenchmark (): Promise<GcBenchmark> {
const helia = await createHelia({
blockstore: new FsBlockstore(`${repoPath}/blocks`),
datastore: new LevelDatastore(`${repoPath}/data`),
libp2p: await createLibp2p({
transports: [
webSockets()
],
connectionEncryption: [
noise()
],
streamMuxers: [
yamux()
]
}),
libp2p: {
addresses: {
listen: []
}
},
dagWalkers: [
dagPbWalker
],
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/gc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async function main (): Promise<void> {
await suite.run()

if (process.env.INCREMENT != null) {
if (process.env.ITERATION === '1') {
if (process.env.ITERATIONS === '1') {
console.info('implementation, count, clear pins (ms), add blocks (ms), add pins (ms), gc (ms)')
}

Expand Down

0 comments on commit 17e85f9

Please sign in to comment.