diff options
author | dnlup <dwon.dnl@gmail.com> | 2019-12-20 19:01:49 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-12-25 13:42:58 +0300 |
commit | 3885e157fa67715de65f4093bffdc552770cc502 (patch) | |
tree | d302e8982425a58968f441fbb106eb5e86df17cb /benchmark | |
parent | 1bc7a50fdd203de2e1c3842f98525d7cd97a3cdd (diff) |
benchmark: use let instead of var in child_process
PR-URL: https://github.com/nodejs/node/pull/31043
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/child_process/child-process-exec-stdout.js | 2 | ||||
-rw-r--r-- | benchmark/child_process/child-process-read-ipc.js | 2 | ||||
-rw-r--r-- | benchmark/child_process/child-process-read.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/child_process/child-process-exec-stdout.js b/benchmark/child_process/child-process-exec-stdout.js index a1dc4aa04c7..f750e2cf3e6 100644 --- a/benchmark/child_process/child-process-exec-stdout.js +++ b/benchmark/child_process/child-process-exec-stdout.js @@ -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; }); diff --git a/benchmark/child_process/child-process-read-ipc.js b/benchmark/child_process/child-process-read-ipc.js index a9e9cdf7fd7..827f75b1e54 100644 --- a/benchmark/child_process/child-process-read-ipc.js +++ b/benchmark/child_process/child-process-read-ipc.js @@ -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(() => { diff --git a/benchmark/child_process/child-process-read.js b/benchmark/child_process/child-process-read.js index 3c0144116f5..01e9846be22 100644 --- a/benchmark/child_process/child-process-read.js +++ b/benchmark/child_process/child-process-read.js @@ -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; }); |