import type { BenchStats } from './bench.ts'; type BenchObj = Record; type DimensionSource = Record | readonly unknown[]; type Dimensions = Record; export type CompareArgsContext = { obj: BenchObj; args: any[]; }; export type CompareMetricContext = CompareArgsContext & { stats: BenchStats['stats']; perSec: bigint; iterations: number; }; type CompareAmount = number | ((ctx: CompareArgsContext) => number); type CompareIterations = number | ((ctx: CompareArgsContext) => number); export type CompareThroughput = { amount: CompareAmount; unit: string; name?: string; width?: number; diff?: boolean; higherIsBetter?: boolean; }; export type CompareMetric = { name: string; unit?: string; width?: number; diff?: boolean; higherIsBetter?: boolean; compute: (ctx: CompareMetricContext) => number; }; export type CompareOpts = { libraryDimensions?: string[]; defaults?: BenchObj; dimensions?: string[]; filter?: string | string[]; filterObj?: (obj: BenchObj) => boolean; dryRun?: boolean; loadRun?: string; patchArgs?: (args: any[], obj: BenchObj) => any[]; printUnchanged?: boolean; iterations?: CompareIterations; skipThreshold?: number; format?: 'csv' | 'table'; bytes?: CompareAmount; throughput?: CompareThroughput | CompareThroughput[]; metrics?: CompareMetric[]; }; declare function compare(title: string, dimensions: Dimensions, libs: Record, opts: CompareOpts): Promise; export default compare; export { compare };