/** * Memory monitoring and optimization for large test suites */ export interface MemoryStats { heapUsed: number; heapTotal: number; external: number; rss: number; percentUsed: number; systemFree: number; systemTotal: number; } export interface MemorySummary { samples: number; heap: { min: string; max: string; avg: string; }; rss: { min: string; max: string; avg: string; }; } export declare class MemoryMonitor { private samples; private warningThreshold; private criticalThreshold; private checkInterval; /** * Get current memory statistics */ static getStats(): MemoryStats; /** * Format bytes to human-readable string */ static formatBytes(bytes: number): string; /** * Start monitoring memory usage */ startMonitoring(intervalMs?: number): void; /** * Stop monitoring */ stopMonitoring(): void; /** * Get memory usage summary */ getSummary(): MemorySummary | null; /** * Trigger garbage collection if available */ private triggerGarbageCollection; } /** * Data chunking utilities for processing large test suites */ export declare class DataChunker { private chunkSize; constructor(chunkSize?: number); /** * Split array into chunks */ chunk(items: T[]): T[][]; /** * Process items in chunks with callback */ processChunks(items: T[], processor: (chunk: T[], index: number) => Promise): Promise; /** * Process items in chunks and collect results */ mapChunks(items: T[], mapper: (chunk: T[], index: number) => Promise): Promise; } /** * Object pool for reusing objects and reducing GC pressure */ export declare class ObjectPool { private available; private factory; private reset; constructor(factory: () => T, reset: (obj: T) => void, initialSize?: number); /** * Acquire object from pool */ acquire(): T; /** * Release object back to pool */ release(obj: T): void; /** * Get pool size */ size(): number; /** * Clear pool */ clear(): void; } //# sourceMappingURL=memory.d.ts.map