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

Function wrappedEmit

benchmark/diagnostics_channel/http.js:42–59  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

40
41 const { emit } = http.Server.prototype;
42 function wrappedEmit(...args) {
43 const [name, req, res] = args;
44 if (name === 'request') {
45 als.enterWith({
46 url: req.url,
47 start: process.hrtime.bigint(),
48 });
49
50 res.on('finish', () => {
51 times.push({
52 ...als.getStore(),
53 statusCode: res.statusCode,
54 end: process.hrtime.bigint(),
55 });
56 });
57 }
58 return emit.apply(this, args);
59 }
60 http.Server.prototype.emit = wrappedEmit;
61
62 return () => {

Callers

nothing calls this directly

Calls 5

enterWithMethod · 0.45
onMethod · 0.45
pushMethod · 0.45
getStoreMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…