/**
 * Startup Timing Utility
 *
 * Tracks and reports startup performance metrics.
 * Useful for identifying slow modules and optimizing cold start times.
 */
export interface StartupPhase {
    name: string;
    startTime: number;
    endTime: number;
    duration: number;
    metadata?: Record<string, unknown>;
}
export interface StartupMetrics {
    totalTime: number;
    phases: StartupPhase[];
    slowPhases: StartupPhase[];
    timestamp: Date;
}
export interface StartupTimingConfig {
    /** Enable timing collection */
    enabled: boolean;
    /** Threshold for slow phase detection (ms) */
    slowThresholdMs: number;
    /** Log timing to console */
    logToConsole: boolean;
    /** Include in process title for monitoring */
    updateProcessTitle: boolean;
}
/**
 * Initialize startup timing with optional config
 */
export declare function initStartupTiming(overrideConfig?: Partial<StartupTimingConfig>): void;
/**
 * Start timing a phase
 */
export declare function startPhase(name: string): void;
/**
 * End timing a phase
 */
export declare function endPhase(name: string, metadata?: Record<string, unknown>): number;
/**
 * Measure an async operation
 */
export declare function measurePhase<T>(name: string, fn: () => Promise<T>, metadata?: Record<string, unknown>): Promise<T>;
/**
 * Measure a sync operation
 */
export declare function measurePhaseSync<T>(name: string, fn: () => T, metadata?: Record<string, unknown>): T;
/**
 * Mark startup as complete and get metrics
 */
export declare function completeStartup(): StartupMetrics;
/**
 * Get current metrics without completing startup
 */
export declare function getStartupMetrics(): StartupMetrics;
/**
 * Get total startup time so far
 */
export declare function getElapsedTime(): number;
/**
 * Record a phase directly (when start/end times are known)
 */
export declare function recordPhase(name: string, startTime: number, endTime: number, metadata?: Record<string, unknown>): void;
/**
 * Clear all recorded phases
 */
export declare function clearPhases(): void;
/**
 * Format metrics for display
 */
export declare function formatStartupMetrics(metrics: StartupMetrics): string;
/**
 * Log startup metrics to console
 */
export declare function logStartupMetrics(metrics: StartupMetrics): void;
/**
 * Create a timed import function
 */
export declare function timedImport<T>(name: string, importFn: () => Promise<T>): () => Promise<T>;
/**
 * Create a lazy loader with timing
 */
export declare function timedLazy<T>(name: string, loader: () => Promise<T>): () => Promise<T>;
/**
 * Update timing configuration
 */
export declare function updateTimingConfig(newConfig: Partial<StartupTimingConfig>): void;
/**
 * Get current configuration
 */
export declare function getTimingConfig(): StartupTimingConfig;
/**
 * Enable timing (useful for debugging)
 */
export declare function enableTiming(): void;
/**
 * Disable timing
 */
export declare function disableTiming(): void;
/**
 * Quick startup timer for simple use cases
 */
export declare class StartupTimer {
    private startTime;
    private marks;
    constructor();
    mark(name: string): number;
    getMark(name: string): number | undefined;
    getElapsed(): number;
    getMarks(): Record<string, number>;
    format(): string;
}
export declare const PROCESS_START_TIME: number;
