-
Notifications
You must be signed in to change notification settings - Fork 446
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(@libp2p/protocol-perf): Implement perf protocol #1604
Conversation
ae5fbfd
to
b76cc80
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.
🚀
What are the next steps on this? I'd like to make sure js-libp2p isn't getting left behind on the perf dashboarding. |
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 logic and stylistic concerns lgtm
Agreed @BigLep . I am going to refactor the PerfService to allow this to be configured the way configure our other optional services now following @achingbrain 's suggestion, as well as incorporate @wemeetagain 's feedback and then that should return this PR to a ready state. |
Thank you @maschad.
I will then integrate it into libp2p/test-plans#163. |
CI check failure is fixed by #1801 |
Since this is our first benchmark tests there isn't really a precedent, but do we want to run these types of tests in our regular PR workflow or would it be better suited to be run on the main branch ? cc @achingbrain @wemeetagain @MarcoPolo |
What are you referring to with "these types of tests"? For libp2p/test-plans#184 we plan to run it before every release for now. |
I was referring to benchmark tests there (as opposed to our other types of tests such as unit or integration tests). But if the plan is to run it before every release then the answer to my question would be to run these post-merge on the main branch. |
In the ideal world, this should run on every PR to highlight any perf regressions or improvements. It should fail CI if perf degrades by more than X% relative to the |
Can we pull in https://github.com/ipfs-shipyard/js-libp2p-transfer-performance into test/perf as a followup? This would allow us to close libp2p/test-plans#65 |
@achingbrain suggestion: add this as a package to the monorepo (in a folder called perf/ in packages/) |
Currently blocked by a huge refactor in #1833 |
ea8a063
to
d853d12
Compare
Update: Running these perf tests locally i.e. running I had spent a significant amount of time trying to run the perf tests using the terraform provisioned infrastructure but to no avail, it ended up being a lot of AWS wrangling which I think is tangential to the essence of this PR, more is outlined here These tests will be ran on this workflow but given this PR outputs the measurement of latency to stdout as required by the test plans implementation setup this PR should be ready for review. |
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.
Looking promising, comments inline.
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.
Can only comment. I'd request changes if I could.
I think we can get rid of some of the code here 😄
I've made the requested changes and I've removed the perf workflow as discussed here for now, once libp2p/test-plans#244 is merged we can introduce a workflow to run on release / main in a follow up PRs. |
@maschad please ping me once you need another review here. |
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.
I would approve if I could (my own PR).
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.
LGTM
Just a few changes before merge:
- Update the
@packageDocumentation
inindex.ts
to show examples for perf not circuit relay - this will appear on the API docs page for the package - Rename the
packages/perf
folder topackages/protocol-perf
- to be consistent withpeer-discovery-mdns
/peer-discovery-bootstrap
,transport-tcp
/transport-webrtc
/transport-websockets
/etc
Co-authored-by: Marco Munizaga <git@marcopolo.io> Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
Implements libp2p/specs#478