Skip to content

Commit

Permalink
benchmark: use let instead of var in child_process
Browse files Browse the repository at this point in the history
PR-URL: #31043
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
dnlup authored and BethGriggs committed Feb 6, 2020
1 parent 340ce92 commit c732564
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-exec-stdout.js
Expand Up @@ -19,7 +19,7 @@ function childProcessExecStdout({ dur, len }) {
const cmd = `yes "${'.'.repeat(len)}"`;
const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] });

var bytes = 0;
let bytes = 0;
child.stdout.on('data', (msg) => {
bytes += msg.length;
});
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read-ipc.js
Expand Up @@ -26,7 +26,7 @@ if (process.argv[2] === 'child') {
const child = spawn(process.argv[0],
[process.argv[1], 'child', len], options);

var bytes = 0;
let bytes = 0;
child.on('message', (msg) => { bytes += msg.length; });

setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read.js
Expand Up @@ -24,7 +24,7 @@ function main({ dur, len }) {
const options = { 'stdio': ['ignore', 'pipe', 'ignore'] };
const child = child_process.spawn('yes', [msg], options);

var bytes = 0;
let bytes = 0;
child.stdout.on('data', (msg) => {
bytes += msg.length;
});
Expand Down

0 comments on commit c732564

Please sign in to comment.