Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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
  • Loading branch information
thisalihassan committed Apr 10, 2024
commit d1005fb39b9c14ea9126b3e8341392c871569f64
2 changes: 1 addition & 1 deletion benchmark/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (showProgress) {
const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set];
child = spawn('taskset', spawnArgs, {
env: process.env,
stdio: ['inherit', 'pipe', 'pipe'],
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
});

child.stdout.pipe(process.stdout);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (format === 'csv') {
let child;
if (cpuCore !== null) {
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
stdio: ['inherit', 'pipe', 'pipe'],
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
});

child.stdout.pipe(process.stdout);
Expand Down