diff --git a/benchmark/events/ee-add-remove.js b/benchmark/events/ee-add-remove.js index 7b6ec35f29b636..eee8ff4524ed1a 100644 --- a/benchmark/events/ee-add-remove.js +++ b/benchmark/events/ee-add-remove.js @@ -4,9 +4,7 @@ const events = require('events'); const bench = common.createBenchmark(main, { n: [25e4] }); -function main(conf) { - const n = conf.n | 0; - +function main({ n }) { const ee = new events.EventEmitter(); const listeners = []; diff --git a/benchmark/events/ee-emit.js b/benchmark/events/ee-emit.js index 3d7eb43b228b71..686ed10d3ecbfd 100644 --- a/benchmark/events/ee-emit.js +++ b/benchmark/events/ee-emit.js @@ -8,11 +8,7 @@ const bench = common.createBenchmark(main, { listeners: [1, 5, 10], }); -function main(conf) { - const n = conf.n | 0; - const argc = conf.argc | 0; - const listeners = Math.max(conf.listeners | 0, 1); - +function main({ n, argc, listeners }) { const ee = new EventEmitter(); for (var k = 0; k < listeners; k += 1) diff --git a/benchmark/events/ee-listener-count-on-prototype.js b/benchmark/events/ee-listener-count-on-prototype.js index 708f62f06687fe..cf6a33f44af9d1 100644 --- a/benchmark/events/ee-listener-count-on-prototype.js +++ b/benchmark/events/ee-listener-count-on-prototype.js @@ -4,9 +4,7 @@ const EventEmitter = require('events').EventEmitter; const bench = common.createBenchmark(main, { n: [5e7] }); -function main(conf) { - const n = conf.n | 0; - +function main({ n }) { const ee = new EventEmitter(); for (var k = 0; k < 5; k += 1) { diff --git a/benchmark/events/ee-listeners-many.js b/benchmark/events/ee-listeners-many.js index 6cb0682b1ca9c3..9a1562eb2c005c 100644 --- a/benchmark/events/ee-listeners-many.js +++ b/benchmark/events/ee-listeners-many.js @@ -4,9 +4,7 @@ const EventEmitter = require('events').EventEmitter; const bench = common.createBenchmark(main, { n: [5e6] }); -function main(conf) { - const n = conf.n | 0; - +function main({ n }) { const ee = new EventEmitter(); ee.setMaxListeners(101); diff --git a/benchmark/events/ee-listeners.js b/benchmark/events/ee-listeners.js index dff73de0b17fc4..d076dc646c93a7 100644 --- a/benchmark/events/ee-listeners.js +++ b/benchmark/events/ee-listeners.js @@ -4,9 +4,7 @@ const EventEmitter = require('events').EventEmitter; const bench = common.createBenchmark(main, { n: [5e6] }); -function main(conf) { - const n = conf.n | 0; - +function main({ n }) { const ee = new EventEmitter(); for (var k = 0; k < 5; k += 1) { diff --git a/benchmark/events/ee-once.js b/benchmark/events/ee-once.js index d9e87a2b0843af..e1a09fb4b71167 100644 --- a/benchmark/events/ee-once.js +++ b/benchmark/events/ee-once.js @@ -4,9 +4,7 @@ const EventEmitter = require('events').EventEmitter; const bench = common.createBenchmark(main, { n: [2e7] }); -function main(conf) { - const n = conf.n | 0; - +function main({ n }) { const ee = new EventEmitter(); function listener() {}