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

Method start

src/utils.ts:877–890  ·  view source on GitHub ↗

* Start monitoring memory usage

(intervalMs: number = 1000)

Source from the content-addressed store, hash-verified

875 * Start monitoring memory usage
876 */
877 start(intervalMs: number = 1000): void {
878 this.stop();
879 this.peakUsage = 0;
880
881 this.checkInterval = setInterval(() => {
882 const usage = process.memoryUsage().heapUsed;
883 if (usage > this.peakUsage) {
884 this.peakUsage = usage;
885 }
886 if (usage > this.threshold && this.onThresholdExceeded) {
887 this.onThresholdExceeded(usage);
888 }
889 }, intervalMs);
890 }
891
892 /**
893 * Stop monitoring

Callers

nothing calls this directly

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected