node/benchmark/crypto/getcipherinfo.js
James M Snell ed94bc48f3
src: update crypto.getCipherInfo() to use DictionaryTemplate
Also, have it use a null prototype

PR-URL: https://github.com/nodejs/node/pull/60036
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-10-05 14:05:35 +00:00

17 lines
329 B
JavaScript

'use strict';
const common = require('../common.js');
const { getCiphers, getCipherInfo } = require('node:crypto');
const bench = common.createBenchmark(main, {
cipher: getCiphers(),
n: 50,
});
function main({ n, cipher }) {
bench.start();
for (let i = 0; i < n; i++) {
getCipherInfo(cipher);
}
bench.end(n);
}