benchmark-suite
Version:
A simple suite of benchmarking tests
14 lines (13 loc) • 494 B
text/typescript
import Stats from 'stats-accumulator';
import type { MemoryRunOnceResult, RunOptions, RunResult, TestFn } from './types.ts';
export default class MemoryTest {
name: string;
fn: TestFn;
n: number;
constructor(name: string, fn: TestFn);
run(options?: RunOptions): Promise<RunResult>;
callibrate(options: RunOptions): Promise<void>;
runOnce(options?: RunOptions): Promise<MemoryRunOnceResult>;
metric(stats: Stats): number;
formatStats(stats: Stats): string;
}