TS-Scribe - v1.2.0
    Preparing search index...

    Type Alias BenchmarkOptions<T>

    Options for the benchmark function.

    type BenchmarkOptions<T> = {
        iterations?: number;
        label?: string;
        log?: boolean;
        onBenchmarkComplete?: (info: BenchmarkInfo<T>) => void;
    }

    Type Parameters

    • T
    Index

    Properties

    iterations?: number

    Number of times to run the benchmarked function. Durations are averaged across all iterations, reducing noise from JIT warm-up and GC pauses.

    1
    
    label?: string

    Optional label for the benchmark. Used in logged output and callback info.

    "My Benchmark"
    
    log?: boolean

    When true, logs a summary to the console after the benchmark completes.

    false
    
    onBenchmarkComplete?: (info: BenchmarkInfo<T>) => void

    Callback invoked when the benchmark is complete.

    Type Declaration