-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add transfer benchmark #90
Conversation
fbeed88
to
9f9bc60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some comments
const subjectA = await implA.create() | ||
const subjectB = await implB.create() | ||
|
||
const addr = await subjectB.addr() | ||
await subjectA.dial(addr) | ||
|
||
const cid = await subjectA.add(bufferStream(file.size), file.options) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the CIDs for each file in files
unique? If so, we could move the creation of subjectA
and subjectB
outside of this inner-most for loop to right after the implA->implB
log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not, it might be useful to utilize tinybench's beforeEach
so it can handle timings appropriately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CIDs are randomly generated but the nodes are set up/torn down on each iteration to ensure we're starting from fresh each time.
We're only measuring the transfer speed here so this doesn't affect the outcome.
Adds a benchmark suite for doing various size data transfers between helia, kubo and js-ipfs. Closes #88
5e4b67d
to
0e95ef8
Compare
Adds a benchmark suite for doing various size data transfers between helia and kubo.
Closes #88