| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ function childProcessExecStdout({ dur, len }) { | |||
| 19 | 19 | const cmd = `yes "${'.'.repeat(len)}"`; | |
| 20 | 20 | const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] }); | |
| 21 | 21 | ||
| 22 | - var bytes = 0; | ||
| 22 | + let bytes = 0; | ||
| 23 | 23 | child.stdout.on('data', (msg) => { | |
| 24 | 24 | bytes += msg.length; | |
| 25 | 25 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ if (process.argv[2] === 'child') { | |||
| 26 | 26 | const child = spawn(process.argv[0], | |
| 27 | 27 | [process.argv[1], 'child', len], options); | |
| 28 | 28 | ||
| 29 | - var bytes = 0; | ||
| 29 | + let bytes = 0; | ||
| 30 | 30 | child.on('message', (msg) => { bytes += msg.length; }); | |
| 31 | 31 | ||
| 32 | 32 | setTimeout(() => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ function main({ dur, len }) { | |||
| 24 | 24 | const options = { 'stdio': ['ignore', 'pipe', 'ignore'] }; | |
| 25 | 25 | const child = child_process.spawn('yes', [msg], options); | |
| 26 | 26 | ||
| 27 | - var bytes = 0; | ||
| 27 | + let bytes = 0; | ||
| 28 | 28 | child.stdout.on('data', (msg) => { | |
| 29 | 29 | bytes += msg.length; | |
| 30 | 30 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments