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

Method enable

lib/trace_events.js:41–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 }
40
41 enable() {
42 if (!this.#enabled) {
43 this.#enabled = true;
44 this.#handle.enable();
45 enabledTracingObjects.add(this);
46 if (enabledTracingObjects.size > kMaxTracingCount) {
47 process.emitWarning(
48 'Possible trace_events memory leak detected. There are more than ' +
49 `${kMaxTracingCount} enabled Tracing objects.`,
50 );
51 }
52 }
53 }
54
55 disable() {
56 if (this.#enabled) {

Callers 8

constructorMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
enabledFunction · 0.45
enabledWithDestroyFunction · 0.45
enabledWithInitOnlyFunction · 0.45
buildCurrentResourceFunction · 0.45
buildDestroyFunction · 0.45

Calls 1

addMethod · 0.65

Tested by

no test coverage detected