/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
benchmark/crypto/get-ciphers.js
21 строка
412 B
Lei Shi
benchmark: update iterations in benchmark/crypto/get-ciphers.js
02 дек 2023, 06:04
Не верифицирован
02 дек 2023, 06:04
1b16bf6
Код
Авторство
О чём код?
'use strict'; const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1, 500000], v: ['crypto', 'tls'], }); function main({ n, v }) { const method = require(v).getCiphers; let i = 0; // First call to getCiphers will dominate the results if (n > 1) { for (; i < n; i++) method(); } bench.start(); for (i = 0; i < n; i++) method(); bench.end(n); }