Skip to content

Commit 021e172

Browse files
thisalihassannodejs-github-bot
authored andcommitted
benchmark: add ipc support to spawn stdio config
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 <[email protected]> Reviewed-By: Raz Luvaton <[email protected]>
1 parent 3634f9c commit 021e172

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

benchmark/compare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if (showProgress) {
8383
const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set];
8484
child = spawn('taskset', spawnArgs, {
8585
env: process.env,
86-
stdio: ['inherit', 'pipe', 'pipe'],
86+
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
8787
});
8888

8989
child.stdout.pipe(process.stdout);

benchmark/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if (format === 'csv') {
5454
let child;
5555
if (cpuCore !== null) {
5656
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
57-
stdio: ['inherit', 'pipe', 'pipe'],
57+
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
5858
});
5959

6060
child.stdout.pipe(process.stdout);

0 commit comments

Comments
 (0)