tinybench - v5.0.1
    Preparing search index...

    Interface ResolvedBenchOptions

    Bench options

    interface ResolvedBenchOptions {
        iterations: number;
        name?: string;
        now: () => number;
        setup: Hook;
        signal?: AbortSignal;
        teardown: Hook;
        throws: NonNullable<undefined | boolean>;
        time: number;
        warmup: NonNullable<undefined | boolean>;
        warmupIterations: number;
        warmupTime: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    iterations: number

    number of times that a task should run if even the time option is finished

    64
    
    name?: string

    benchmark name

    now: () => number

    function to get the current timestamp in milliseconds

    setup: Hook

    setup function to run before each benchmark task (cycle)

    signal?: AbortSignal

    An AbortSignal for aborting the benchmark

    teardown: Hook

    teardown function to run after each benchmark task (cycle)

    throws: NonNullable<undefined | boolean>

    Throws if a task fails

    false
    
    time: number

    time needed for running a benchmark task (milliseconds)

    1000
    
    warmup: NonNullable<undefined | boolean>

    warmup benchmark

    true
    
    warmupIterations: number

    warmup iterations

    16
    
    warmupTime: number

    warmup time (milliseconds)

    250