Skip to content

Commit d1005fb

Browse files
committed
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: nodejs#52233 Refs: nodejs/performance#161
1 parent 756acd0 commit d1005fb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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)