summaryrefslogtreecommitdiff
path: root/benchmark/dgram/bind-params.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-12-30 04:00:35 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-01-23 01:29:33 +0100
commitb2966043c993ae113295d56a73c1b43f7b263813 (patch)
tree48c10a5b2c100cdf1619b781df04f7ac9d8aa9ec /benchmark/dgram/bind-params.js
parentd49580d8121c1ca75b53fbbc4445f68deb6207a4 (diff)
downloadandroid-node-v8-b2966043c993ae113295d56a73c1b43f7b263813.tar.gz
android-node-v8-b2966043c993ae113295d56a73c1b43f7b263813.tar.bz2
android-node-v8-b2966043c993ae113295d56a73c1b43f7b263813.zip
benchmark: (dgram) use destructuring
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/dgram/bind-params.js')
-rw-r--r--benchmark/dgram/bind-params.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/benchmark/dgram/bind-params.js b/benchmark/dgram/bind-params.js
index 411bef98ad..5f7999f7a3 100644
--- a/benchmark/dgram/bind-params.js
+++ b/benchmark/dgram/bind-params.js
@@ -12,10 +12,9 @@ const configs = {
const bench = common.createBenchmark(main, configs);
const noop = () => {};
-function main(conf) {
- const n = +conf.n;
- const port = conf.port === 'true' ? 0 : undefined;
- const address = conf.address === 'true' ? '0.0.0.0' : undefined;
+function main({ n, port, address }) {
+ port = port === 'true' ? 0 : undefined;
+ address = address === 'true' ? '0.0.0.0' : undefined;
if (port !== undefined && address !== undefined) {
bench.start();