MCPcopy Create free account
hub / github.com/code-pushup/cli / close

Method close

packages/utils/src/lib/profiler/profiler-node.ts:275–281  ·  view source on GitHub ↗

* Closes profiler and releases resources. Idempotent, safe for exit handlers. * **Exit Handler Usage**: Call only this method from process exit handlers.

()

Source from the content-addressed store, hash-verified

273 * **Exit Handler Usage**: Call only this method from process exit handlers.
274 */
275 close(): void {
276 if (this.#state === 'closed') {
277 return;
278 }
279 this.#unsubscribeExitHandlers?.();
280 this.#transition('closed');
281 }
282
283 /** @returns Current profiler state */
284 get state(): 'idle' | 'running' | 'closed' {

Callers 11

constructorMethod · 0.95
#handleFatalErrorMethod · 0.95
wal.int.test.tsFile · 0.45
repackMethod · 0.45
wal.unit.test.tsFile · 0.45
#transitionMethod · 0.45

Calls 1

#transitionMethod · 0.95

Tested by

no test coverage detected