diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-30 04:01:23 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-01-23 01:29:34 +0100 |
commit | 6394c8d99dda8ee56e97cd80c72a8142ef78795d (patch) | |
tree | 53963071114f8672b8108a5a4a532362411bdffe /benchmark/domain | |
parent | b2966043c993ae113295d56a73c1b43f7b263813 (diff) | |
download | node-new-6394c8d99dda8ee56e97cd80c72a8142ef78795d.tar.gz |
benchmark: use destructuring
This applies to all `async_hooks`, `dns`, `cluster`, `domain` and
`module` benchmarks.
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/domain')
-rw-r--r-- | benchmark/domain/domain-fn-args.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/benchmark/domain/domain-fn-args.js b/benchmark/domain/domain-fn-args.js index 0b98d17674..fe912e34d2 100644 --- a/benchmark/domain/domain-fn-args.js +++ b/benchmark/domain/domain-fn-args.js @@ -3,17 +3,15 @@ const common = require('../common.js'); const domain = require('domain'); const bench = common.createBenchmark(main, { - arguments: [0, 1, 2, 3], + args: [0, 1, 2, 3], n: [10] }); const bdomain = domain.create(); const gargs = [1, 2, 3]; -function main(conf) { - - const n = +conf.n; - const myArguments = gargs.slice(0, conf.arguments); +function main({ n, args }) { + const myArguments = gargs.slice(0, args); bench.start(); bdomain.enter(); |