MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / emitSnapshot

Function emitSnapshot

apps/cloud/src/observability/memory-metrics.ts:155–163  ·  view source on GitHub ↗
(event: string, now: number, maxQueueSize: number)

Source from the content-addressed store, hash-verified

153};
154
155const emitSnapshot = (event: string, now: number, maxQueueSize: number): void => {
156 lastSnapshotEmittedAt = now;
157 console.log(
158 `${LOG_PREFIX} ${JSON.stringify({
159 event,
160 ...snapshot(now, maxQueueSize),
161 })}`,
162 );
163};
164
165const maybeEmitPeriodicSnapshot = (now: number, maxQueueSize: number): void => {
166 if (now - lastSnapshotEmittedAt < PERIODIC_EMIT_INTERVAL_MS) return;

Callers 2

wrapMcpSseResponseFunction · 0.85

Calls 2

snapshotFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected