GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: add undici websocket benchmark by Ch3nYuY · Pull Request #50586 · nodejs/node

Conversation

@Ch3nYuY

@Ch3nYuY Ch3nYuY commented Nov 7, 2023

Copy link
Copy Markdown

Refs: nodejs/performance#114

I added a simple benchmark for the undici websocket. I modified the client in https://github.com/websockets/ws/blob/master/bench/speed.js to use undici instead.

Platform
Linux benchmark-S2600WFT 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

20.x vs 21.x

➜  websocket git: ✗ node-benchmark-compare compare-v20-v21.csv
                                                                   confidence improvement accuracy (*)    (**)   (***)
websocket/simple.js size=1048576 roundtrips=1 useBinary='false'           ***     -4.76 %       ±2.08%  ±3.06%  ±4.65%
websocket/simple.js size=1048576 roundtrips=1 useBinary='true'            ***     -3.67 %       ±0.89%  ±1.42%  ±2.50%
websocket/simple.js size=1048576 roundtrips=100 useBinary='false'         ***      3.80 %       ±1.05%  ±1.57%  ±2.47%
websocket/simple.js size=1048576 roundtrips=100 useBinary='true'                   2.15 %       ±2.42%  ±3.61%  ±5.65%
websocket/simple.js size=1048576 roundtrips=1000 useBinary='false'                 2.45 %       ±3.38%  ±5.38%  ±9.37%
websocket/simple.js size=1048576 roundtrips=1000 useBinary='true'         ***      2.92 %       ±0.96%  ±1.41%  ±2.15%
websocket/simple.js size=1048576 roundtrips=5000 useBinary='false'          *      3.18 %       ±3.04%  ±4.56%  ±7.20%
websocket/simple.js size=1048576 roundtrips=5000 useBinary='true'           *      2.19 %       ±2.03%  ±3.05%  ±4.82%
websocket/simple.js size=131072 roundtrips=1 useBinary='false'             **     -7.30 %       ±4.48%  ±6.73% ±10.66%
websocket/simple.js size=131072 roundtrips=1 useBinary='true'              **     -7.36 %       ±3.40%  ±4.99%  ±7.60%
websocket/simple.js size=131072 roundtrips=100 useBinary='false'          ***     10.01 %       ±3.04%  ±4.94%  ±8.92%
websocket/simple.js size=131072 roundtrips=100 useBinary='true'           ***     10.70 %       ±4.10%  ±6.30% ±10.37%
websocket/simple.js size=131072 roundtrips=1000 useBinary='false'                  1.93 %       ±1.97%  ±2.88%  ±4.35%
websocket/simple.js size=131072 roundtrips=1000 useBinary='true'            *      1.97 %       ±1.73%  ±2.58%  ±4.03%
websocket/simple.js size=131072 roundtrips=5000 useBinary='false'                  0.78 %       ±2.01%  ±2.94%  ±4.46%
websocket/simple.js size=131072 roundtrips=5000 useBinary='true'            *      1.79 %       ±1.67%  ±2.53%  ±4.09%
websocket/simple.js size=16384 roundtrips=1 useBinary='false'              **     -2.66 %       ±1.57%  ±2.29%  ±3.44%
websocket/simple.js size=16384 roundtrips=1 useBinary='true'                      -1.60 %       ±3.18%  ±5.06%  ±8.81%
websocket/simple.js size=16384 roundtrips=100 useBinary='false'            **     11.25 %       ±4.08%  ±6.69% ±12.23%
websocket/simple.js size=16384 roundtrips=100 useBinary='true'            ***     12.92 %       ±4.48%  ±6.53%  ±9.81%
websocket/simple.js size=16384 roundtrips=1000 useBinary='false'           **      6.52 %       ±3.31%  ±5.26%  ±9.16%
websocket/simple.js size=16384 roundtrips=1000 useBinary='true'           ***      6.92 %       ±0.66%  ±0.97%  ±1.47%
websocket/simple.js size=16384 roundtrips=5000 useBinary='false'                   2.79 %       ±4.68%  ±6.88% ±10.51%
websocket/simple.js size=16384 roundtrips=5000 useBinary='true'                    3.22 %       ±3.66%  ±6.05% ±11.24%
websocket/simple.js size=64 roundtrips=1 useBinary='false'                  *     -3.62 %       ±2.36%  ±3.78%  ±6.64%
websocket/simple.js size=64 roundtrips=1 useBinary='true'                   *     -3.05 %       ±2.39%  ±3.72%  ±6.28%
websocket/simple.js size=64 roundtrips=100 useBinary='false'              ***     12.20 %       ±5.13%  ±7.46% ±11.23%
websocket/simple.js size=64 roundtrips=100 useBinary='true'                **     10.84 %       ±4.84%  ±7.83% ±14.05%
websocket/simple.js size=64 roundtrips=1000 useBinary='false'             ***      9.51 %       ±0.92%  ±1.42%  ±2.32%
websocket/simple.js size=64 roundtrips=1000 useBinary='true'                *      7.52 %       ±6.22% ±10.26% ±19.04%
websocket/simple.js size=64 roundtrips=5000 useBinary='false'              **      1.62 %       ±0.90%  ±1.31%  ±1.97%
websocket/simple.js size=64 roundtrips=5000 useBinary='true'                *      1.33 %       ±1.06%  ±1.54%  ±2.34%
 
Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 32 comparisons, you can thus expect the following amount of false-positive results:
  1.60 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.32 false positives, when considering a   1% risk acceptance (**, ***),
  0.03 false positives, when considering a 0.1% risk acceptance (***)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pluris reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Chenyu Yang
benchmark: add undici websocket benchmark
f2cc56d
Refs: nodejs/performance#114
@nodejs-github-bot nodejs-github-bot added the benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. label Nov 7, 2023
@Ch3nYuY Ch3nYuY mentioned this pull request Nov 7, 2023
undici websocket nodejs/performance#114
Open
anonrig
anonrig reviewed Nov 7, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca reviewed Nov 7, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

KhafraDev
KhafraDev reviewed Nov 7, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Chenyu Yang
benchmark: update websocket server
8292e19
lpinca
lpinca reviewed Nov 9, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Chenyu Yang
benchmark: update undici benchmark
6a67c02
lpinca
lpinca reviewed Nov 9, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca reviewed Nov 9, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca reviewed Nov 9, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Chenyu Yang added 2 commits November 10, 2023 12:14
Chenyu Yang
benchamrk: update undici websocket benchmark
d591842
Chenyu Yang
test: add test/benchmark/test-benchmark-websocket.js
21ff7a0
lpinca
lpinca reviewed Nov 13, 2023
View reviewed changes
Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread benchmark/websocket/simple.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/benchmark/test-benchmark-websocket.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Chenyu Yang added 2 commits November 14, 2023 10:33
Chenyu Yang
update undici websocket benchmark & test
84e0d3b
Chenyu Yang
fix lint error
406077c
@lpinca

lpinca commented Nov 14, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There is a typo in a commit message ("benchamrk" -> "benchmark") but I think we will squash commits so it does not matter.

Ch3nYuY reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Nov 14, 2023
Chenyu Yang
update undici websocket benchmark
5da73e6
lpinca
lpinca approved these changes Nov 14, 2023
View reviewed changes
@Ch3nYuY
Ch3nYuY requested a review from KhafraDev November 30, 2023 14:03
@Ch3nYuY

Ch3nYuY commented Dec 5, 2023

Copy link
Copy Markdown
Author

@lpinca I noticed that you have approved this PR for three weeks now, but it has not been merged yet. Is it still waiting for approval from other reviewers? Thank you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

KhafraDev
KhafraDev approved these changes Dec 5, 2023
View reviewed changes

@KhafraDev KhafraDev left a comment

Copy link
Copy Markdown
Member

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.

My bad, I've been very busy the last few weeks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Ch3nYuY reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@lpinca lpinca added the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 5, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 5, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/50586
✔  Done loading data for nodejs/node/pull/50586
----------------------------------- PR info ------------------------------------
Title      benchmark: add undici websocket benchmark (#50586)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     chenyuyang2022:ws-bench -> nodejs:main
Labels     benchmark, commit-queue-squash
Commits    8
 - benchmark: add undici websocket benchmark
 - benchmark: update websocket server
 - benchmark: update undici benchmark
 - benchamrk: update undici websocket benchmark
 - test: add test/benchmark/test-benchmark-websocket.js
 - update undici websocket benchmark & test
 - fix lint error
 - update undici websocket benchmark
Committers 1
 - Chenyu Yang 
PR-URL: https://github.com/nodejs/node/pull/50586
Refs: https://github.com/nodejs/performance/issues/114
Reviewed-By: Luigi Pinca 
Reviewed-By: Matthew Aitken 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50586
Refs: https://github.com/nodejs/performance/issues/114
Reviewed-By: Luigi Pinca 
Reviewed-By: Matthew Aitken 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Tue, 07 Nov 2023 03:49:19 GMT
   ✔  Approvals: 2
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/50586#pullrequestreview-1729891063
   ✔  - Matthew Aitken (@KhafraDev): https://github.com/nodejs/node/pull/50586#pullrequestreview-1765869891
   ✔  Last GitHub CI successful
   ✘  No Jenkins CI runs detected
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/7105461887
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 5, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 5, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/56111/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca added commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Dec 6, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 6, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 212a972 into nodejs:main Dec 6, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator

Landed in 212a972

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RafaelGSS pushed a commit that referenced this pull request Dec 15, 2023
Chenyu Yang @RafaelGSS
benchmark: add undici websocket benchmark
38fd0ca
Refs: nodejs/performance#114
PR-URL: #50586
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Dec 15, 2023
v21.5.0 proposal #51166
Merged
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Chenyu Yang @richardlau
benchmark: add undici websocket benchmark
443d4fc
Refs: nodejs/performance#114
PR-URL: #50586
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
@richardlau richardlau mentioned this pull request Mar 25, 2024
v20.12.0 proposal #52212
Merged
@lpinca lpinca mentioned this pull request May 5, 2024
bench: add websockets nodejs/undici#3203
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@anonrig anonrig anonrig left review comments
@lpinca lpinca lpinca approved these changes
@KhafraDev KhafraDev KhafraDev approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. commit-queue-squash PRs the Commit Queue should land as one squashed commit.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Ch3nYuY @lpinca @nodejs-github-bot @anonrig @KhafraDev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.