Skip to content

Commit

Permalink
benchmark: use let instead of var in async_hooks
Browse files Browse the repository at this point in the history
PR-URL: #30470
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
dnlup authored and targos committed Dec 1, 2019
1 parent 6908a84 commit 2ad7003
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions benchmark/async_hooks/gc-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ function endAfterGC(n) {
}

function main({ n, method }) {
var i;
switch (method) {
case 'trackingEnabled':
bench.start();
for (i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
new AsyncResource('foobar');
}
endAfterGC(n);
break;
case 'trackingDisabled':
bench.start();
for (i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
new AsyncResource('foobar', { requireManualDestroy: true });
}
endAfterGC(n);
Expand Down

0 comments on commit 2ad7003

Please sign in to comment.