export type RendererTimingSampleSource = "gpu" | "cpu-fallback";
export interface RendererTimingSample {
    readonly label: string;
    readonly durationMs: number;
    readonly cpuDurationMs: number;
    readonly gpuDurationMs?: number;
    readonly source: RendererTimingSampleSource;
    readonly fallbackReason?: string;
}
export interface RendererTimingSnapshot {
    readonly gpuTimingSupported: boolean;
    readonly cpuFallbackActive: boolean;
    readonly sampleCount: number;
    readonly unavailableReason?: string;
    readonly samples: readonly RendererTimingSample[];
}
export interface RendererGpuTimingToken {
    readonly label: string;
}
export interface RendererGpuTimingBackend {
    readonly supported: boolean;
    readonly unavailableReason?: string;
    begin(label: string): RendererGpuTimingToken;
    end(token: RendererGpuTimingToken, cpuDurationMs: number): number | undefined;
    collectAvailable?(): readonly RendererGpuTimingResult[];
}
export interface RendererGpuTimingResult {
    readonly label: string;
    readonly durationMs: number;
}
export interface RendererTimingCollectorOptions {
    readonly gpuBackend?: RendererGpuTimingBackend;
    readonly now?: () => number;
    readonly fallbackReason?: string;
}
export declare class RendererTimingCollector {
    private readonly samples;
    private readonly gpuBackend;
    private readonly now;
    private readonly fallbackReason;
    constructor(options?: RendererTimingCollectorOptions);
    measure<T>(label: string, callback: () => T): T;
    begin(label: string): {
        end(): RendererTimingSample;
    };
    snapshot(): RendererTimingSnapshot;
    private createSample;
    private collectAvailableGpuResults;
}
export declare function createCpuFallbackGpuTimingBackend(unavailableReason?: string): RendererGpuTimingBackend;
export declare function createImmediateGpuTimingBackend(durationMs: number): RendererGpuTimingBackend;
export declare function createWebGL2GpuTimingBackend(gl: WebGL2RenderingContext): RendererGpuTimingBackend;
//# sourceMappingURL=RendererTiming.d.ts.map