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:
parent
83a285e0ec
commit
20b7f4a5e9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user