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 <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b714e94 commit 15adbe8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

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

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

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

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

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

3232
setTimeout(()=>{

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

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

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

0 commit comments

Comments
 (0)