/** * Infrastructure: Memory Tracker * Efficiently tracks memory usage without expensive JSON.stringify operations */ import { LogEntry } from '../../domain/entities/LogEntry'; export interface MemoryStats { readonly totalBytes: number; readonly totalMB: number; readonly entryCount: number; readonly avgEntrySize: number; } export declare class MemoryTracker { private totalSize; private entrySizes; private entryCount; /** * Add an entry and track its size */ addEntry(entry: LogEntry): void; /** * Remove an entry and update total size */ removeEntry(entry: LogEntry): void; /** * Remove multiple entries */ removeEntries(entries: LogEntry[]): void; /** * Get total size in bytes */ getTotalSize(): number; /** * Get total size in megabytes */ getTotalSizeMB(): number; /** * Get entry count */ getEntryCount(): number; /** * Get average entry size */ getAvgEntrySize(): number; /** * Get memory statistics */ getStats(): MemoryStats; /** * Reset all tracking */ reset(): void; /** * Estimate size of a log entry without JSON.stringify * This is much faster and gives a reasonable approximation */ private estimateSize; private graphSize; } //# sourceMappingURL=MemoryTracker.d.ts.map