Skip to content

Commit

Permalink
benchmark: inherit stdio/stderr instead of pipe
Browse files Browse the repository at this point in the history
PR-URL: #52456
Fixes: #52233
Refs: nodejs/performance#161
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
  • Loading branch information
thisalihassan authored and marco-ippolito committed May 2, 2024
1 parent 11887d5 commit c96df78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions benchmark/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ 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', 'ipc'],
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
});

child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
} else {
child = fork(resolvedPath, cli.optional.set, {
execPath: cli.optional[job.binary],
Expand Down
5 changes: 1 addition & 4 deletions benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ if (format === 'csv') {
let child;
if (cpuCore !== null) {
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
});

child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
} else {
child = fork(
scriptPath,
Expand Down

0 comments on commit c96df78

Please sign in to comment.