blob: 257c9af2fd531e347882e1bbab41929e10592972 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
'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);
}
|