Skip to main content

Class: Suite

Constructors

new Suite()

new Suite(name, options?): Suite

Parameters

name: string

options?: SuiteOptions

Returns

Suite

Defined in

src/suite.ts:25

Methods

addBenchmark()

addBenchmark(benchmark): Suite

Parameters

benchmark: Benchmark

Returns

Suite

Defined in

src/suite.ts:34


run()

run(): Promise<Record<string, Result[]>>

Returns

Promise<Record<string, Result[]>>

Defined in

src/suite.ts:77


withBenchmarkReporter()

withBenchmarkReporter(reporter): Suite

Parameters

reporter: BenchmarkReporter

Returns

Suite

Defined in

src/suite.ts:54


withErrorStrategy()

withErrorStrategy(errorStrategy, opts?): Suite

Sets the error strategy for the suite and optionally for the benchmarks.

Parameters

errorStrategy: ErrorStrategy

Determines what to do when an error occurs during a benchmark run. See ErrorStrategy

opts?

Options for the error strategy. If shouldSetOnBenchmarks is true, the error strategy will be set on all benchmarks in the suite.

opts.shouldSetOnBenchmarks?: boolean

Returns

Suite

Defined in

src/suite.ts:64


withReporter()

withReporter(reporter): Suite

Parameters

reporter: SuiteReporter

Returns

Suite

Defined in

src/suite.ts:49


withVariation()

withVariation(variation): Suite

Parameters

variation: Variation

Returns

Suite

Defined in

src/suite.ts:39


withVariations()

withVariations(variations): Suite

Parameters

variations: Variation[]

Returns

Suite

Defined in

src/suite.ts:44