Skip to content

Commit 0300598

Browse files
thisalihassanmarco-ippolito
authored andcommittedMay 3, 2024
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 <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
1 parent 1c1a693 commit 0300598

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎benchmark/compare.js

+1-1
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

+1-1
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)