mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +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:
parent
021e172415
commit
82891ae1a9
|
|
@ -83,11 +83,8 @@ if (showProgress) {
|
||||||
const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set];
|
const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set];
|
||||||
child = spawn('taskset', spawnArgs, {
|
child = spawn('taskset', spawnArgs, {
|
||||||
env: process.env,
|
env: process.env,
|
||||||
stdio: ['inherit', 'pipe', 'pipe', 'ipc'],
|
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
|
||||||
});
|
});
|
||||||
|
|
||||||
child.stdout.pipe(process.stdout);
|
|
||||||
child.stderr.pipe(process.stderr);
|
|
||||||
} else {
|
} else {
|
||||||
child = fork(resolvedPath, cli.optional.set, {
|
child = fork(resolvedPath, cli.optional.set, {
|
||||||
execPath: cli.optional[job.binary],
|
execPath: cli.optional[job.binary],
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,8 @@ if (format === 'csv') {
|
||||||
let child;
|
let child;
|
||||||
if (cpuCore !== null) {
|
if (cpuCore !== null) {
|
||||||
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
|
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 {
|
} else {
|
||||||
child = fork(
|
child = fork(
|
||||||
scriptPath,
|
scriptPath,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user