/** * Progress Tracker * * Tracks progress of streaming operations with: * - Progress percentage calculation * - ETA estimation (time remaining) * - Throughput calculation (bytes/sec) * - Progress event emission */ export interface ProgressInfo { bytesProcessed: number; totalBytes: number; percentage: number; throughput: number; eta: number; elapsedTime: number; } export type ProgressCallback = (info: ProgressInfo) => void; export declare class ProgressTracker { private bytesProcessed; private totalBytes; private startTime; private lastUpdateTime; private callbacks; constructor(totalBytes?: number); /** * Update progress with new bytes processed */ update(bytesProcessed: number, totalBytes?: number): void; /** * Get current progress information */ getProgress(): ProgressInfo; /** * Calculate progress percentage (0-100) */ getPercentage(): number; /** * Calculate throughput in bytes per second */ getThroughput(): number; /** * Estimate time remaining in milliseconds */ getETA(): number; /** * Format bytes to human-readable string */ formatBytes(bytes: number): string; /** * Format milliseconds to human-readable time */ formatTime(ms: number): string; /** * Get human-readable progress summary */ getSummary(): string; /** * Register progress callback */ onProgress(callback: ProgressCallback): void; /** * Emit progress event to all callbacks */ private emitProgress; /** * Reset tracker for new operation */ reset(totalBytes?: number): void; /** * Mark operation as complete */ complete(): void; } /** * Create a progress tracker with automatic callback setup */ export declare function createProgressTracker(totalBytes: number, callback: ProgressCallback): ProgressTracker; //# sourceMappingURL=progress.d.ts.map