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

Function measureSync

benchmark/crypto/kem.js:73–84  ·  view source on GitHub ↗
(n, op, key, keys, ciphertexts)

Source from the content-addressed store, hash-verified

71});
72
73function measureSync(n, op, key, keys, ciphertexts) {
74 bench.start();
75 for (let i = 0; i < n; ++i) {
76 const k = key || keys[i];
77 if (op === 'encapsulate') {
78 crypto.encapsulate(k);
79 } else {
80 crypto.decapsulate(k, ciphertexts[i]);
81 }
82 }
83 bench.end(n);
84}
85
86function measureAsync(n, op, key, keys, ciphertexts) {
87 let remaining = n;

Callers 1

mainFunction · 0.70

Calls 2

startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…