0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

benchmark: use let instead of var in async_hooks

PR-URL: https://github.com/nodejs/node/pull/30470
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
dnlup 2019-11-13 17:47:08 +01:00 committed by Anna Henningsen
parent 83a285e0ec
commit 20b7f4a5e9
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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);