Skip to content

Commit

Permalink
benchmark: (os) use destructuring
Browse files Browse the repository at this point in the history
PR-URL: nodejs#18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR authored and MayaLekova committed May 8, 2018
1 parent 1595efa commit 0a0cecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions benchmark/os/cpus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 1 addition & 3 deletions benchmark/os/loadavg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0a0cecc

Please sign in to comment.