Skip to content
Permalink
Browse files

benchmark: use let instead of var in async_hooks

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 MylesBorins committed Nov 13, 2019
1 parent df2dce0 commit 33e0bd6b7cc680b742729a9991db82380d18d161
Showing with 2 additions and 3 deletions.
  1. +2 −3 benchmark/async_hooks/gc-tracking.js
@@ -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);

0 comments on commit 33e0bd6

Please sign in to comment.
You can’t perform that action at this time.