mirror of https://github.com/nodejs/node.git
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
parent
19bdfa5380
commit
32b3cad576
|
@ -7,9 +7,7 @@ const bench = common.createBenchmark(main, {
|
||||||
n: [3e4]
|
n: [3e4]
|
||||||
});
|
});
|
||||||
|
|
||||||
function main(conf) {
|
function main({ n }) {
|
||||||
const n = +conf.n;
|
|
||||||
|
|
||||||
bench.start();
|
bench.start();
|
||||||
for (var i = 0; i < n; ++i)
|
for (var i = 0; i < n; ++i)
|
||||||
cpus();
|
cpus();
|
||||||
|
|
|
@ -7,9 +7,7 @@ const bench = common.createBenchmark(main, {
|
||||||
n: [5e6]
|
n: [5e6]
|
||||||
});
|
});
|
||||||
|
|
||||||
function main(conf) {
|
function main({ n }) {
|
||||||
const n = +conf.n;
|
|
||||||
|
|
||||||
bench.start();
|
bench.start();
|
||||||
for (var i = 0; i < n; ++i)
|
for (var i = 0; i < n; ++i)
|
||||||
loadavg();
|
loadavg();
|
||||||
|
|
Loading…
Reference in New Issue