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

Function measureAsync

benchmark/crypto/argon2.js:33–43  ·  view source on GitHub ↗
(n, algorithm, message, nonce, options)

Source from the content-addressed store, hash-verified

31}
32
33function measureAsync(n, algorithm, message, nonce, options) {
34 let remaining = n;
35 function done(err) {
36 assert.ifError(err);
37 if (--remaining === 0)
38 bench.end(n);
39 }
40 bench.start();
41 for (let i = 0; i < n; ++i)
42 argon2(algorithm, { ...options, message, nonce, tagLength: 64 }, done);
43}
44
45function main({ n, mode, algorithm, ...options }) {
46 // Message, nonce, secret, associated data & tag length do not affect performance

Callers 1

mainFunction · 0.70

Calls 2

argon2Function · 0.85
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…