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

Function afterRead

benchmark/fs/readfile.js:54–70  ·  view source on GitHub ↗
(er, data)

Source from the content-addressed store, hash-verified

52 }
53
54 function afterRead(er, data) {
55 if (er) {
56 throw er;
57 }
58
59 if (data.length !== len)
60 throw new Error('wrong number of bytes returned');
61
62 reads++;
63 const benchEnded = Date.now() >= endAt;
64
65 if (benchEnded && (++waitConcurrent) === concurrent) {
66 stop();
67 } else if (!benchEnded) {
68 read();
69 }
70 }
71
72 for (let i = 0; i < concurrent; i++) read();
73}

Callers

nothing calls this directly

Calls 3

nowMethod · 0.80
stopFunction · 0.70
readFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…