/**
 * Parallel Execution System for Generators
 * Executes independent generators in parallel for significant performance improvements
 */
import { GeneratorContext, Generator, GenerationResult, GeneratedFile } from './types';
export interface ParallelExecutionOptions {
    /**
     * Maximum number of generators to run in parallel
     * Default: Number of CPU cores - 1, min 2, max 8
     */
    maxConcurrency?: number;
    /**
     * Timeout for each generator in milliseconds
     * Default: 60000 (60 seconds)
     */
    timeout?: number;
    /**
     * Whether to fail fast (stop on first error) or collect all errors
     * Default: false (collect all errors)
     */
    failFast?: boolean;
    /**
     * Progress callback
     */
    onProgress?: (completed: number, total: number, generatorName: string) => void;
}
export interface ParallelExecutionResult {
    results: Map<string, GenerationResult>;
    allFiles: GeneratedFile[];
    allErrors: string[];
    allWarnings: string[];
    executionTimes: Map<string, number>;
    totalDuration: number;
}
export declare class ParallelExecutor {
    private readonly defaultMaxConcurrency;
    constructor();
    /**
     * Execute generators in parallel with intelligent batching
     */
    execute(generators: Array<{
        name: string;
        generator: Generator;
    }>, context: GeneratorContext, options?: ParallelExecutionOptions): Promise<ParallelExecutionResult>;
    /**
     * Execute a single generator with timeout
     */
    private executeGenerator;
    /**
     * Get recommended concurrency based on system resources and workload
     */
    getRecommendedConcurrency(generatorCount: number): number;
    /**
     * Analyze generator dependencies (for future dependency-aware execution)
     * Currently returns empty dependencies (all generators are independent)
     */
    analyzeDependencies(generators: Array<{
        name: string;
        generator: Generator;
    }>): Map<string, string[]>;
    /**
     * Create execution plan considering dependencies (for future use)
     * Currently returns simple batches since no dependencies exist
     */
    createExecutionPlan(generators: Array<{
        name: string;
        generator: Generator;
    }>, dependencies: Map<string, string[]>, maxConcurrency: number): string[][];
}
/**
 * Utility class for tracking parallel execution metrics
 */
export declare class ExecutionMetrics {
    private metrics;
    /**
     * Record generator execution
     */
    record(name: string, duration: number, filesGenerated: number, success: boolean): void;
    /**
     * Get total execution time
     */
    getTotalTime(): number;
    /**
     * Get average execution time per generator
     */
    getAverageTime(): number;
    /**
     * Get slowest generator
     */
    getSlowestGenerator(): {
        name: string;
        duration: number;
    } | null;
    /**
     * Get fastest generator
     */
    getFastestGenerator(): {
        name: string;
        duration: number;
    } | null;
    /**
     * Get success rate
     */
    getSuccessRate(): number;
    /**
     * Get formatted summary
     */
    getSummary(): string;
    /**
     * Get all metrics
     */
    getAll(): Map<string, {
        duration: number;
        filesGenerated: number;
        success: boolean;
        startTime: number;
        endTime: number;
    }>;
}
//# sourceMappingURL=parallel-executor.d.ts.map