UNPKG

@dapplion/benchmark

Version:

Ensures that new code does not introduce performance regressions with CI. Tracks:

15 lines 557 B
import { BenchmarkResult, BenchmarkOpts } from "../types.js"; export type BenchmarkRunOpts = BenchmarkOpts & { id: string; }; export type BenchmarkRunOptsWithFn<T, T2> = BenchmarkOpts & { id: string; fn: (arg: T) => void | Promise<void>; before?: () => T2 | Promise<T2>; beforeEach?: (arg: T2, i: number) => T | Promise<T>; }; export declare function runBenchFn<T, T2>(opts: BenchmarkRunOptsWithFn<T, T2>, persistRunsNs?: boolean): Promise<{ result: BenchmarkResult; runsNs: bigint[]; }>; //# sourceMappingURL=runBenchFn.d.ts.map