Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: use let instead of var in child_process #31043

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-exec-stdout.js
Expand Up @@ -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;
});
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read-ipc.js
Expand Up @@ -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(() => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read.js
Expand Up @@ -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;
});
Expand Down