/** * Benchmark verdicts: how one metric changed between a baseline and a * candidate, and the one-line tally of those verdicts. Pure functions, so the * rules are tested without compiling a page. */ /** A change smaller than this many percent of the baseline reads as unchanged. */ export declare const UNCHANGED_PERCENT = 1; export type Better = 'lower' | 'higher'; export type Verdict = 'improved' | 'regressed' | 'unchanged'; export interface MetricComparison { /** Candidate minus baseline. */ delta: number; /** Change relative to the baseline, in percent; null when the baseline is zero. */ percent: number | null; verdict: Verdict; } export declare const BETTER_VALUES: readonly Better[]; /** * Compare one metric. With a zero baseline there is no percentage, and any * change is judged on its direction alone; otherwise a change under * `UNCHANGED_PERCENT` of the baseline is unchanged. */ export declare function compareMetric(baseline: number, candidate: number, better: Better): MetricComparison; /** "3 improved, 1 regressed": the non-zero counts in a fixed order. */ export declare function verdictSummary(verdicts: readonly Verdict[]): string; //# sourceMappingURL=benchmark-verdict.d.ts.map