Skip to content

Commit

Permalink
child_process: fix IPC benchmark message has two more bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ypresto committed Jan 1, 2017
1 parent ccac4b4 commit 58f6cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark/child_process/child-process-read-ipc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
if (process.argv[2] === 'child') {
const len = +process.argv[3];
const msg = `"${'.'.repeat(len)}"`;
const msg = '.'.repeat(len);
const send = () => {
while (process.send(msg));
// Wait: backlog of unsent messages exceeds threshold
Expand All @@ -24,7 +24,7 @@ if (process.argv[2] === 'child') {
const dur = +conf.dur;
const len = +conf.len;

const options = { 'stdio': ['ignore', 'ignore', 'ignore', 'ipc'] };
const options = { 'stdio': ['ignore', 1, 2, 'ipc'] };
const child = spawn(process.argv[0],
[process.argv[1], 'child', len], options);

Expand Down

0 comments on commit 58f6cc0

Please sign in to comment.