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

Function getServeCallbacks

benchmark/async_hooks/async-resource-vs-destroy.js:147–158  ·  view source on GitHub ↗
(getCLS, setCLS)

Source from the content-addressed store, hash-verified

145}
146
147function getServeCallbacks(getCLS, setCLS) {
148 return function serve(req, res) {
149 setCLS(Math.random());
150 setTimeout(() => {
151 readFile(__filename, () => {
152 if (res.destroyed) return;
153 res.setHeader('content-type', 'application/json');
154 res.end(JSON.stringify({ cls: getCLS() }));
155 });
156 }, 10);
157 };
158}
159
160const types = {
161 'async-resource': buildCurrentResource,

Callers

nothing calls this directly

Calls 7

setCLSFunction · 0.85
getCLSFunction · 0.85
randomMethod · 0.80
setHeaderMethod · 0.80
setTimeoutFunction · 0.50
readFileFunction · 0.50
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…