Skip to content

Commit 15adbe8

Browse files
dnluptargos
authored andcommitted
benchmark: use let instead of var in child_process
PR-URL: #31043 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent b714e94 commit 15adbe8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

benchmark/child_process/child-process-exec-stdout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function childProcessExecStdout({ dur, len }) {
1919
const cmd = `yes "${'.'.repeat(len)}"`;
2020
const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] });
2121

22-
var bytes = 0;
22+
let bytes = 0;
2323
child.stdout.on('data', (msg) => {
2424
bytes += msg.length;
2525
});

benchmark/child_process/child-process-read-ipc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (process.argv[2] === 'child') {
2626
const child = spawn(process.argv[0],
2727
[process.argv[1], 'child', len], options);
2828

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

3232
setTimeout(() => {

benchmark/child_process/child-process-read.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function main({ dur, len }) {
2424
const options = { 'stdio': ['ignore', 'pipe', 'ignore'] };
2525
const child = child_process.spawn('yes', [msg], options);
2626

27-
var bytes = 0;
27+
let bytes = 0;
2828
child.stdout.on('data', (msg) => {
2929
bytes += msg.length;
3030
});

0 commit comments

Comments
 (0)