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

Function getObserverType

lib/internal/perf/observe.js:129–138  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

127}
128
129function getObserverType(type) {
130 switch (type) {
131 case 'gc': return NODE_PERFORMANCE_ENTRY_TYPE_GC;
132 case 'http2': return NODE_PERFORMANCE_ENTRY_TYPE_HTTP2;
133 case 'http': return NODE_PERFORMANCE_ENTRY_TYPE_HTTP;
134 case 'net': return NODE_PERFORMANCE_ENTRY_TYPE_NET;
135 case 'dns': return NODE_PERFORMANCE_ENTRY_TYPE_DNS;
136 case 'quic': return NODE_PERFORMANCE_ENTRY_TYPE_QUIC;
137 }
138}
139
140function maybeDecrementObserverCounts(entryTypes) {
141 for (const type of entryTypes) {

Callers 3

hasObserverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected