mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
366 B
21 lines
366 B
9 years ago
|
'use strict';
|
||
|
|
||
|
const common = require('../common.js');
|
||
|
|
||
|
const bench = common.createBenchmark(main, {
|
||
|
n: [1, 5000],
|
||
|
v: ['crypto', 'tls']
|
||
|
});
|
||
|
|
||
|
function main(conf) {
|
||
|
const n = +conf.n;
|
||
|
const v = conf.v;
|
||
|
const method = require(v).getCiphers;
|
||
|
var i = 0;
|
||
|
|
||
|
common.v8ForceOptimization(method);
|
||
|
bench.start();
|
||
|
for (; i < n; i++) method();
|
||
|
bench.end(n);
|
||
|
}
|