UNPKG

benchmark-suite

Version:
17 lines (16 loc) 656 B
import EventEmitter from 'eventemitter3'; import type Stats from 'stats-accumulator'; import type { RunOptions, RunResult, Test, TestFn } from './types.ts'; export { default as MemoryTest } from './MemoryTest.ts'; export { default as OperationsTest } from './OperationsTest.ts'; export * from './types.ts'; export type TestType = 'Memory' | 'Operations'; export default class Suite extends EventEmitter { name: string; TestClass: Test; tests: Test[]; constructor(name: string, testOrType: TestType | Test); add(name: string, fn: TestFn): void; run(options?: RunOptions): Promise<RunResult>; formatStats(stats: Stats): string; }