BenchOptions: {
    iterations?: number;
    now?: (() => number);
    setup?: Hook;
    signal?: AbortSignal;
    teardown?: Hook;
    throws?: boolean;
    time?: number;
    warmupIterations?: number;
    warmupTime?: number;
}

Type declaration

  • Optional iterations?: number

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

    Default

    10
    
  • Optional now?: (() => number)

    function to get the current timestamp in milliseconds

      • (): number
      • function to get the current timestamp in milliseconds

        Returns number

  • Optional setup?: Hook

    setup function to run before each benchmark task (cycle)

  • Optional signal?: AbortSignal

    An AbortSignal for aborting the benchmark

  • Optional teardown?: Hook

    teardown function to run after each benchmark task (cycle)

  • Optional throws?: boolean

    Throw if a task fails (events will not work if true)

  • Optional time?: number

    time needed for running a benchmark task (milliseconds)

    Default

    500
    
  • Optional warmupIterations?: number

    warmup iterations

    Default

    5
    
  • Optional warmupTime?: number

    warmup time (milliseconds)

    Default

    100ms
    

Generated using TypeDoc