MCPcopy Create free account
hub / github.com/nodejs/node / maybeDecrementObserverCounts

Function maybeDecrementObserverCounts

lib/internal/perf/observe.js:140–154  ·  view source on GitHub ↗
(entryTypes)

Source from the content-addressed store, hash-verified

138}
139
140function maybeDecrementObserverCounts(entryTypes) {
141 for (const type of entryTypes) {
142 const observerType = getObserverType(type);
143
144 if (observerType !== undefined) {
145 observerCounts[observerType]--;
146
147 if (observerType === NODE_PERFORMANCE_ENTRY_TYPE_GC &&
148 observerCounts[observerType] === 0) {
149 removeGarbageCollectionTracking();
150 gcTrackingInstalled = false;
151 }
152 }
153 }
154}
155
156function maybeIncrementObserverCount(type) {
157 const observerType = getObserverType(type);

Callers 2

observeMethod · 0.85
disconnectMethod · 0.85

Calls 1

getObserverTypeFunction · 0.85

Tested by

no test coverage detected