Skip to content

Commit b070fa2

Browse files
committed
benchmark: fix stdio on stderr for child process
1 parent e87f992 commit b070fa2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

benchmark/compare.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,16 @@ 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', 'ipc'],
86+
stdio: ['inherit', 'pipe', 'pipe'],
8787
});
8888

8989
child.stdout.on('data', (data) => {
9090
process.stdout.write(data);
9191
});
92+
93+
child.stderr.on('data', (data) => {
94+
process.stdout.write(data);
95+
});
9296
} else {
9397
child = fork(resolvedPath, cli.optional.set, {
9498
execPath: cli.optional[job.binary],

benchmark/run.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ if (format === 'csv') {
5454
let child;
5555
if (cpuCore !== null) {
5656
child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], {
57-
stdio: ['inherit', 'pipe', 'ipc'],
57+
stdio: ['inherit', 'pipe', 'pipe'],
5858
});
5959

6060
child.stdout.on('data', (data) => {
6161
process.stdout.write(data);
6262
});
63+
64+
child.stderr.on('data', (data) => {
65+
process.stderr.write(data);
66+
});
6367
} else {
6468
child = fork(
6569
scriptPath,

0 commit comments

Comments
 (0)