Skip to content

Commit 2ad7003

Browse files
dnluptargos
authored andcommitted
benchmark: use let instead of var in async_hooks
PR-URL: #30470 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 6908a84 commit 2ad7003

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

benchmark/async_hooks/gc-tracking.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ function endAfterGC(n) {
2222
}
2323

2424
function main({ n, method }) {
25-
var i;
2625
switch (method) {
2726
case 'trackingEnabled':
2827
bench.start();
29-
for (i = 0; i < n; i++) {
28+
for (let i = 0; i < n; i++) {
3029
new AsyncResource('foobar');
3130
}
3231
endAfterGC(n);
3332
break;
3433
case 'trackingDisabled':
3534
bench.start();
36-
for (i = 0; i < n; i++) {
35+
for (let i = 0; i < n; i++) {
3736
new AsyncResource('foobar', { requireManualDestroy: true });
3837
}
3938
endAfterGC(n);

0 commit comments

Comments
 (0)