(er, data)
| 84 | } |
| 85 | |
| 86 | function afterZip(er, data) { |
| 87 | if (er) |
| 88 | throw er; |
| 89 | |
| 90 | zips++; |
| 91 | const benchEnded = Date.now() >= endAt; |
| 92 | |
| 93 | if (benchEnded && (++waitConcurrent) === targetConcurrency) { |
| 94 | stop(); |
| 95 | } else if (!benchEnded) { |
| 96 | zip(); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | // Start reads |
| 101 | for (let i = 0; i < concurrent; i++) read(); |