diff --git a/benchmark/timers/immediate.js b/benchmark/timers/immediate.js index bbe81555cacc97..7ddb5cb05af40d 100644 --- a/benchmark/timers/immediate.js +++ b/benchmark/timers/immediate.js @@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, { type: ['depth', 'depth1', 'breadth', 'breadth1', 'breadth4', 'clear'] }); -function main(conf) { - const N = +conf.thousands * 1e3; - switch (conf.type) { +function main({ thousands, type }) { + const N = thousands * 1e3; + switch (type) { case 'depth': depth(N); break; diff --git a/benchmark/timers/set-immediate-breadth-args.js b/benchmark/timers/set-immediate-breadth-args.js index 348cb62fb2cc1a..d5b5a9878066db 100644 --- a/benchmark/timers/set-immediate-breadth-args.js +++ b/benchmark/timers/set-immediate-breadth-args.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { millions: [5] }); -function main(conf) { - const N = +conf.millions * 1e6; +function main({ millions }) { + const N = millions * 1e6; process.on('exit', function() { bench.end(N / 1e6); diff --git a/benchmark/timers/set-immediate-breadth.js b/benchmark/timers/set-immediate-breadth.js index 3d8b038342634d..a4b217b5bff8d6 100644 --- a/benchmark/timers/set-immediate-breadth.js +++ b/benchmark/timers/set-immediate-breadth.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { millions: [10] }); -function main(conf) { - const N = +conf.millions * 1e6; +function main({ millions }) { + const N = millions * 1e6; process.on('exit', function() { bench.end(N / 1e6); diff --git a/benchmark/timers/set-immediate-depth-args.js b/benchmark/timers/set-immediate-depth-args.js index 704b1814514a93..fe1340c4bd55f2 100644 --- a/benchmark/timers/set-immediate-depth-args.js +++ b/benchmark/timers/set-immediate-depth-args.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { millions: [5] }); -function main(conf) { - const N = +conf.millions * 1e6; +function main({ millions }) { + const N = millions * 1e6; process.on('exit', function() { bench.end(N / 1e6); diff --git a/benchmark/timers/timers-breadth.js b/benchmark/timers/timers-breadth.js index 02ebd5bb0d082b..b05b3f91b1859d 100644 --- a/benchmark/timers/timers-breadth.js +++ b/benchmark/timers/timers-breadth.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { thousands: [5000], }); -function main(conf) { - const N = +conf.thousands * 1e3; +function main({ thousands }) { + const N = thousands * 1e3; var n = 0; bench.start(); function cb() { diff --git a/benchmark/timers/timers-cancel-pooled.js b/benchmark/timers/timers-cancel-pooled.js index 23cef153876f20..33897507c83937 100644 --- a/benchmark/timers/timers-cancel-pooled.js +++ b/benchmark/timers/timers-cancel-pooled.js @@ -6,8 +6,8 @@ const bench = common.createBenchmark(main, { millions: [5], }); -function main(conf) { - const iterations = +conf.millions * 1e6; +function main({ millions }) { + const iterations = millions * 1e6; var timer = setTimeout(() => {}, 1); for (var i = 0; i < iterations; i++) { diff --git a/benchmark/timers/timers-cancel-unpooled.js b/benchmark/timers/timers-cancel-unpooled.js index 50931e35124724..57e0139dfe1a4a 100644 --- a/benchmark/timers/timers-cancel-unpooled.js +++ b/benchmark/timers/timers-cancel-unpooled.js @@ -6,8 +6,8 @@ const bench = common.createBenchmark(main, { millions: [1], }); -function main(conf) { - const iterations = +conf.millions * 1e6; +function main({ millions }) { + const iterations = millions * 1e6; const timersList = []; for (var i = 0; i < iterations; i++) { diff --git a/benchmark/timers/timers-depth.js b/benchmark/timers/timers-depth.js index 42dc652b277781..ca74eee393fd45 100644 --- a/benchmark/timers/timers-depth.js +++ b/benchmark/timers/timers-depth.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { thousands: [1], }); -function main(conf) { - const N = +conf.thousands * 1e3; +function main({ thousands }) { + const N = thousands * 1e3; var n = 0; bench.start(); setTimeout(cb, 1); diff --git a/benchmark/timers/timers-insert-pooled.js b/benchmark/timers/timers-insert-pooled.js index 8bbc84290ad9b7..59d2c490c3a9b2 100644 --- a/benchmark/timers/timers-insert-pooled.js +++ b/benchmark/timers/timers-insert-pooled.js @@ -5,8 +5,8 @@ const bench = common.createBenchmark(main, { millions: [5], }); -function main(conf) { - const iterations = +conf.millions * 1e6; +function main({ millions }) { + const iterations = millions * 1e6; bench.start(); diff --git a/benchmark/timers/timers-insert-unpooled.js b/benchmark/timers/timers-insert-unpooled.js index efe8e9aaa579c2..56526633358e42 100644 --- a/benchmark/timers/timers-insert-unpooled.js +++ b/benchmark/timers/timers-insert-unpooled.js @@ -6,8 +6,8 @@ const bench = common.createBenchmark(main, { millions: [1], }); -function main(conf) { - const iterations = +conf.millions * 1e6; +function main({ millions }) { + const iterations = millions * 1e6; const timersList = []; diff --git a/benchmark/timers/timers-timeout-pooled.js b/benchmark/timers/timers-timeout-pooled.js index d39c8cf969a49b..df88e2784f8f91 100644 --- a/benchmark/timers/timers-timeout-pooled.js +++ b/benchmark/timers/timers-timeout-pooled.js @@ -8,8 +8,8 @@ const bench = common.createBenchmark(main, { millions: [10], }); -function main(conf) { - const iterations = +conf.millions * 1e6; +function main({ millions }) { + const iterations = millions * 1e6; let count = 0; // Function tracking on the hidden class in V8 can cause misleading