benchmark: (os) 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>
pull/18259/merge
Ruben Bridgewater 2017-12-30 03:56:55 +01:00
parent 19bdfa5380
commit 32b3cad576
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
2 changed files with 2 additions and 6 deletions

View File

@ -7,9 +7,7 @@ const bench = common.createBenchmark(main, {
n: [3e4]
});
function main(conf) {
const n = +conf.n;
function main({ n }) {
bench.start();
for (var i = 0; i < n; ++i)
cpus();

View File

@ -7,9 +7,7 @@ const bench = common.createBenchmark(main, {
n: [5e6]
});
function main(conf) {
const n = +conf.n;
function main({ n }) {
bench.start();
for (var i = 0; i < n; ++i)
loadavg();