export interface MetricSpread { median: number; min: number; max: number; } export interface MultirunStats { analyses: number; requested: number; cachedReplays: number; } export interface MultirunResult { stats: MultirunStats; scores: Record; metrics: Record; runs: PageSpeedRun[]; } /** * One Lighthouse run is noise: TBT routinely swings 3x between runs on an * unchanged page. Report the median of N genuinely distinct analyses, with the * min-max spread beside it. A change inside the spread is not a change. * * Google re-analyses a URL about once a minute and replays the cached result * in between — five identical fetchTime stamps is one measurement five times * over. Deduplicate on fetchTime, and only count runs that measured something. */ export declare function dedupRuns(runs: PageSpeedRun[]): PageSpeedRun[]; interface PageSpeedRun { lighthouseResult?: { fetchTime?: string; analysisUTCTimestamp?: string; categories?: Record; audits?: Record; }; } export declare function median(values: number[]): number; export declare function spread(values: number[]): MetricSpread | null; /** Median + spread per category score and per key metric across distinct runs. */ export declare function summariseMultirun(runs: PageSpeedRun[]): MultirunResult; export {};