From a824ff7122d816e3416d9828e714ccd2830e0199 Mon Sep 17 00:00:00 2001 From: dnlup Date: Wed, 13 Nov 2019 17:47:08 +0100 Subject: [PATCH] benchmark: use let instead of var in async_hooks --- benchmark/async_hooks/gc-tracking.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmark/async_hooks/gc-tracking.js b/benchmark/async_hooks/gc-tracking.js index d74b2bac463e28..030b5f8e1934f8 100644 --- a/benchmark/async_hooks/gc-tracking.js +++ b/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);