Skip to content
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

feat: perf benchmark example #1605

Closed
wants to merge 5 commits into from
Closed

feat: perf benchmark example #1605

wants to merge 5 commits into from

Conversation

MarcoPolo
Copy link
Collaborator

I had to expose some types to get this example to work. I know we discussed this before, but I don't remember where we landed on it. My thought is that if I can't copy the simplest protocol (ping) to implement my protocol either the API design is broken or we need to rewrite ping and see how it feels with the new API design.

This is in draft since it makes other changes to js-libp2p that aren't related to this example.

Summary of run from my localhost:

❯ node dist/benchmark/src/index.js
TCP+mplex+noise
Download bandwidth is (mbits/s) 289
Upload bandwidth is (mbits/s) 210
TCP+yamux+noise
Download bandwidth is (mbits/s) 149
Upload bandwidth is (mbits/s) 148
TCP+yamux+plaintext
Download bandwidth is (mbits/s) 1098
Upload bandwidth is (mbits/s) 1964
TCP+mplex+plaintext
Download bandwidth is (mbits/s) 1331
Upload bandwidth is (mbits/s) 1808

I've not vetted these numbers yet.

@achingbrain
Copy link
Member

I think this is exactly the sort of thing that would be configured using the changes in this PR: #1563

Extra services that you can use to expand the features of libp2p, but ones that are not going to be shipped by default.

@MarcoPolo
Copy link
Collaborator Author

I think that'll work. Basically if I could initialize the ping service without it being a special builtin, then I'm happy.

@maschad
Copy link
Member

maschad commented Jun 12, 2023

Closing in favour of #1604

@maschad maschad closed this Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants