0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 13:09:21 +01:00

benchmark: inherit stdio/stderr instead of pipe

PR-URL: https://github.com/nodejs/node/pull/52456
Fixes: https://github.com/nodejs/node/issues/52233
Refs: https://github.com/nodejs/performance/pull/161
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
This commit is contained in:
Ali Hassan 2024-04-11 01:35:58 +05:00 committed by Node.js GitHub Bot
parent 021e172415
commit 82891ae1a9
2 changed files with 2 additions and 8 deletions

View File

@ -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],

View File

@ -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,