UNPKG

iso-bench

Version:

Small benchmark library focused in avoiding optimization/deoptimization pollution between tests by isolating them.

23 lines (22 loc) 662 B
import { Test, Sample } from "../../Test"; import { TestOutput } from "./DynamicStream"; export type Group = { name: string; tests: Test[]; started: number; ended: number; output?: TestOutput; }; export declare const enum COLORS { CLEAR = "\u001B[0m", GRAY = "\u001B[30m", RED = "\u001B[31m", GREEN = "\u001B[32m", YELLOW = "\u001B[33m", BLUE = "\u001B[36m" } export declare function formatColor(str: string, color: COLORS, useColor: boolean): string; export declare function getTestLog(padding: number, test: Test, minMax: { min: number; max: number; } | null, useColor: boolean, sample?: Sample): unknown[];