/**
 * Lightweight, env-gated timing profiler for E2E flake diagnosis.
 *
 * Activated by `BOBBIT_E2E_PROFILE=1`. When inactive every wrapper is a
 * direct passthrough — zero overhead in production / normal CI runs.
 *
 * Two surfaces:
 *
 *   profile(label, fn)         — sync timing
 *   profileAsync(label, fn)    — async timing (returns the awaited value)
 *
 * Optional `count` increment lets a caller record an inner work-unit count
 * (e.g. number of `existsSync` invocations inside `getAllConfigDirectories`)
 * separately from the outer call count. Use `bumpCount(label, n)`.
 *
 * Aggregated results are flushed periodically (every 5s by default) and on
 * process exit. Each row prints:
 *
 *   [profile] <label> calls=N p50=Xms p95=Yms p99=Zms max=Wms total=Tms [extra=K]
 *
 * Output goes to stderr so it doesn't interfere with structured stdout.
 *
 * NOTE: This module is intentionally process-local. Each Playwright worker
 * runs in its own Node process, so each worker prints its own table — that
 * is exactly what we want when measuring cross-worker contention.
 */
/** Public recorder for callers that already measured elapsed time. */
export declare function recordElapsed(label: string, ms: number): void;
export declare function bumpCount(label: string, n?: number): void;
export declare function profile<T>(label: string, fn: () => T): T;
export declare function profileAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
export interface ProfileRow {
    label: string;
    calls: number;
    p50: number;
    p95: number;
    p99: number;
    max: number;
    total: number;
    extra: number;
}
export declare function snapshot(): ProfileRow[];
export declare function flush(reason?: string): void;
export declare function reset(): void;
export declare const PROFILE_ENABLED: boolean;
//# sourceMappingURL=profiling.d.ts.map