diff options
Diffstat (limited to 'benchmark/zlib/creation.js')
-rw-r--r-- | benchmark/zlib/creation.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/benchmark/zlib/creation.js b/benchmark/zlib/creation.js index 5046ef50ec..4984bf1a86 100644 --- a/benchmark/zlib/creation.js +++ b/benchmark/zlib/creation.js @@ -10,14 +10,13 @@ const bench = common.createBenchmark(main, { n: [5e5] }); -function main(conf) { - const n = +conf.n; - const fn = zlib[`create${conf.type}`]; +function main({ n, type, options }) { + const fn = zlib[`create${type}`]; if (typeof fn !== 'function') throw new Error('Invalid zlib type'); var i = 0; - if (conf.options === 'true') { + if (options === 'true') { const opts = {}; bench.start(); for (; i < n; ++i) |