mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
efdc571a58
PR-URL: https://github.com/nodejs/node/pull/11516 Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
18 lines
280 B
JavaScript
18 lines
280 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common.js');
|
|
const loadavg = require('os').loadavg;
|
|
|
|
const bench = common.createBenchmark(main, {
|
|
n: [5e6]
|
|
});
|
|
|
|
function main(conf) {
|
|
const n = +conf.n;
|
|
|
|
bench.start();
|
|
for (var i = 0; i < n; ++i)
|
|
loadavg();
|
|
bench.end(n);
|
|
}
|