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

Function afterRead

benchmark/fs/readfile-permission-enabled.js:61–77  ·  view source on GitHub ↗
(er, data)

Source from the content-addressed store, hash-verified

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

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…