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 <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
dnlup authored and BridgeAR committed Nov 19, 2019
1 parent f106086 commit 7f49816
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 7f49816

Please sign in to comment.