MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / start

Method start

src/utils.ts:901–914  ·  view source on GitHub ↗

* Start monitoring memory usage

(intervalMs: number = 1000)

Source from the content-addressed store, hash-verified

899 * Start monitoring memory usage
900 */
901 start(intervalMs: number = 1000): void {
902 this.stop();
903 this.peakUsage = 0;
904
905 this.checkInterval = setInterval(() => {
906 const usage = process.memoryUsage().heapUsed;
907 if (usage > this.peakUsage) {
908 this.peakUsage = usage;
909 }
910 if (usage > this.threshold && this.onThresholdExceeded) {
911 this.onThresholdExceeded(usage);
912 }
913 }, intervalMs);
914 }
915
916 /**
917 * Stop monitoring

Callers

nothing calls this directly

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected