Function
measureAsync
(n, digest, signature, publicKey, keys)
Source from the content-addressed store, hash-verified
| 66 | } |
| 67 | |
| 68 | function measureAsync(n, digest, signature, publicKey, keys) { |
| 69 | let remaining = n; |
| 70 | function done() { |
| 71 | if (--remaining === 0) |
| 72 | bench.end(n); |
| 73 | else |
| 74 | one(); |
| 75 | } |
| 76 | |
| 77 | function one() { |
| 78 | crypto.verify( |
| 79 | digest, |
| 80 | data, |
| 81 | publicKey || keys[n - remaining], |
| 82 | signature, |
| 83 | done); |
| 84 | } |
| 85 | bench.start(); |
| 86 | one(); |
| 87 | } |
| 88 | |
| 89 | function measureAsyncParallel(n, digest, signature, publicKey, keys) { |
| 90 | let remaining = n; |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…