export interface RequestProfileRecord { sequence: number; category: string; method: string; pathname: string; projectSlug?: string; requestMode?: string; status?: number; startedAt: string; completedAt: string; totalMs: number; phases: Record; } export interface RequestProfileContextUpdate { projectSlug?: string; requestMode?: string; } /** Round to 2 decimal places (Server-Timing millisecond precision). */ export declare function roundMs(value: number): number; export declare function isRequestProfilingEnabled(pathname?: string): boolean; export declare function runWithRequestProfiling(options: { category: string; method: string; pathname: string; projectSlug?: string; requestMode?: string; }, fn: () => Promise): Promise; export declare function profilePhase(name: string, fn: () => Promise): Promise; export declare function markRequestProfilePhase(name: string, durationMs?: number): void; export declare function profileSyncPhase(name: string, fn: () => T): T; export declare function updateRequestProfileContext(update: RequestProfileContextUpdate): void; export declare function finalizeRequestProfiling(status?: number): RequestProfileRecord | null; /** Build a Server-Timing header value from a total plus named phase durations. */ export declare function buildServerTimingValue(totalLabel: string, totalMs: number, phases: Iterable<[string, number]>): string; export declare function buildServerTimingHeader(record: RequestProfileRecord): string; export declare function withServerTimingHeader(response: Response, record: RequestProfileRecord | null): Response; export declare function snapshotRequestProfiles(): { enabled: boolean; last_sequence: number; records: RequestProfileRecord[]; }; export declare function resetRequestProfiles(): void; //# sourceMappingURL=request-profiler.d.ts.map