-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
benchmark: add ipc support to benchmark spawn stdio config #52456
Conversation
Enabled inter-process communication (ipc) in the stdio configuration of the spawn function within the benchmark subsystem. This change allows for improved data exchange between parent and benchmarked child processes, addressing limitations in performance testing scenarios. Fixes: nodejs#52233 Refs: nodejs/performance#161
Please remove the pipe to process stdout as this will mess up the compare/run output which should be csv |
okay note that it will not print console.logs/error of child scripts in the terminal then while with fork pipes are established automatically |
That was the old behavior, no? |
when not using CPUSET command benchmark will use fork to run the child scripts and fork prints out console.log/console.errors..info..warn of forked instance to the parent instance thus you can see the logs in the terminal. I wanted to maintain that behavior of fork while using spawn, so that's why we ned to pipe stdio and stderr to the parent (Fork does this by default) |
I know it's unrelated to this PR, but wouldn't |
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
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
Commit Queue failed- Loading data for nodejs/node/pull/52456 ✔ Done loading data for nodejs/node/pull/52456 ----------------------------------- PR info ------------------------------------ Title benchmark: add ipc support to benchmark spawn stdio config (#52456) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch thisalihassan:benchmark-fix-spawn-ipc -> nodejs:main Labels benchmark, performance, author ready, commit-queue-rebase Commits 2 - benchmark: add ipc support to spawn stdio config - benchmark: inherit stdio/stderr instead of pipe Committers 1 - Ali Hassan PR-URL: https://github.com/nodejs/node/pull/52456 Fixes: https://github.com/nodejs/node/issues/52233 Refs: https://github.com/nodejs/performance/pull/161 Reviewed-By: Matteo Collina Reviewed-By: Raz Luvaton ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/52456 Fixes: https://github.com/nodejs/node/issues/52233 Refs: https://github.com/nodejs/performance/pull/161 Reviewed-By: Matteo Collina Reviewed-By: Raz Luvaton -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 10 Apr 2024 19:46:18 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/52456#pullrequestreview-1993644517 ✔ - Raz Luvaton (@rluvaton): https://github.com/nodejs/node/pull/52456#pullrequestreview-1994683235 ✘ Last GitHub CI failed ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/8667228479 |
@rluvaton windows tests are failing for some reason |
Landed in 3634f9c...82891ae |
Enabled inter-process communication (ipc) in the stdio configuration of the spawn function within the benchmark subsystem. This change allows for improved data exchange between parent and benchmarked child processes, addressing limitations in performance testing scenarios. Fixes: #52233 Refs: nodejs/performance#161 PR-URL: #52456 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
PR-URL: #52456 Fixes: #52233 Refs: nodejs/performance#161 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Enabled inter-process communication (ipc) in the stdio configuration of the spawn function within the benchmark subsystem. This change allows for improved data exchange between parent and benchmarked child processes, addressing limitations in performance testing scenarios. Fixes: #52233 Refs: nodejs/performance#161 PR-URL: #52456 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
PR-URL: #52456 Fixes: #52233 Refs: nodejs/performance#161 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Enabled inter-process communication (ipc) in the stdio configuration of the spawn function within the benchmark subsystem. This change allows for improved data exchange between parent and benchmarked child processes, addressing limitations in performance testing scenarios. Fixes: #52233 Refs: nodejs/performance#161 PR-URL: #52456 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
PR-URL: #52456 Fixes: #52233 Refs: nodejs/performance#161 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Enabled inter-process communication (ipc) in the stdio configuration of the spawn function within the benchmark subsystem. This change allows for improved data exchange between parent and benchmarked child processes, addressing limitations in performance testing scenarios. Fixes: #52233 Refs: nodejs/performance#161 PR-URL: #52456 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
PR-URL: #52456 Fixes: #52233 Refs: nodejs/performance#161 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Fix (ipc) in the stdio configuration of the spawn function within the benchmark subsystem.
This PRs fixes the mistake in PR (benchmark: conditionally use spawn with taskset for CPU pinning) where I removed IPC by mistake due to which child.on("message") listener wasn't working.
I also made sure of cpu usage of cores provided to taskset and checked if the csv is all good
Fixes: #52233
Refs: nodejs/performance#161