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

Function measureLegacy

benchmark/crypto/webcrypto-digest.js:26–33  ·  view source on GitHub ↗
(n, data, method)

Source from the content-addressed store, hash-verified

24// will always be faster in clock time.
25
26function measureLegacy(n, data, method) {
27 method = kMethods[method];
28 bench.start();
29 for (let i = 0; i < n; ++i) {
30 createHash(method).update(data).digest();
31 }
32 bench.end(n);
33}
34
35function measureSubtle(n, data, method) {
36 const ec = new TextEncoder();

Callers 1

mainFunction · 0.85

Calls 4

createHashFunction · 0.85
updateMethod · 0.65
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…