-
Notifications
You must be signed in to change notification settings - Fork 525
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
bench: add websockets #3203
base: main
Are you sure you want to change the base?
bench: add websockets #3203
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3203 +/- ##
=======================================
Coverage 94.17% 94.17%
=======================================
Files 90 90
Lines 24432 24432
=======================================
Hits 23009 23009
Misses 1423 1423 ☔ View full report in Codecov by Sentry. |
To have reliable benchmarks you should use two processes, one for the server and one for the client and ensure that the server is faster than the client, otherwise you might end up benchmarking the server instead of the client. See the discussion in nodejs/node#50586. |
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.
Going to block for the previous comments
7af0bac
to
7ef0e3a
Compare
f5204cf
to
370f8cb
Compare
Could I help with that pr somehow @tsctx ? |
370f8cb
to
943796a
Compare
2d4b1f8
to
6a6b336
Compare
/** | ||
* @param {Uint8Array | null} buffer | ||
*/ | ||
static parseFrame (buffer) { |
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 you have to resort to parsing frames, it does not make much sense to use a custom server as it will not be much faster than ws
. If you need a full featured WebSocket server I suggest to use https://github.com/uNetworking/uWebSockets.js . A uWS
WebSocket is faster than a plain net.Socket
.
ba8e551
to
3f6a83e
Compare
841a95b
to
1444870
Compare
Part of #3201