Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 15adbe8

Browse filesBrowse 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
Copy full SHA for 15adbe8

File tree

Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-exec-stdout.js
+1-1Lines changed: 1 addition & 1 deletion
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
});
Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-read-ipc.js
+1-1Lines changed: 1 addition & 1 deletion
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(() => {
Collapse file

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

Copy file name to clipboardExpand all lines: benchmark/child_process/child-process-read.js
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.