MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

benchmark/crypto/create-hmac.js:13–24  ·  view source on GitHub ↗
({ n, algo, keylen })

Source from the content-addressed store, hash-verified

11});
12
13function main({ n, algo, keylen }) {
14 const key = Buffer.alloc(keylen, 'k');
15 const hmacs = new Array(n);
16
17 bench.start();
18 for (let i = 0; i < n; ++i) {
19 hmacs[i] = createHmac(algo, key);
20 }
21 bench.end(n);
22
23 assert.strictEqual(typeof hmacs[n - 1], 'object');
24}

Callers

nothing calls this directly

Calls 4

createHmacFunction · 0.85
allocMethod · 0.80
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected