Class: Benchmark
Extends
BenchmarkBase
Constructors
new Benchmark()
new Benchmark(
name,options?):Benchmark
Parameters
• name: string
• options?
• options.action?: Action
• options.iterations?: number
• options.reporter?: BenchmarkReporter
• options.setup?: SetupMethod
• options.teardown?: TeardownMethod
• options.timeout?: number
Returns
Overrides
BenchmarkBase.constructor
Defined in
Properties
action?
optionalaction:Action
Inherited from
BenchmarkBase.action
Defined in
errorStrategy
errorStrategy:
ErrorStrategy=ErrorStrategy.Continue
Overrides
BenchmarkBase.errorStrategy
Defined in
name
name:
string
Defined in
setupEachMethods
setupEachMethods:
SetupMethod[] =[]
Inherited from
BenchmarkBase.setupEachMethods
Defined in
setupMethods
setupMethods:
SetupMethod[] =[]
Inherited from
BenchmarkBase.setupMethods
Defined in
teardownEachMethods
teardownEachMethods:
TeardownMethod[] =[]
Inherited from
BenchmarkBase.teardownEachMethods
Defined in
teardownMethods
teardownMethods:
TeardownMethod[] =[]
Inherited from
BenchmarkBase.teardownMethods
Defined in
variations
variations:
Variation[] =[]
Defined in
Methods
run()
run():
Promise<Result[]>
Returns
Promise<Result[]>
Defined in
withAction()
withAction(
action):this
Parameters
• action: Action
Returns
this
Overrides
BenchmarkBase.withAction
Defined in
withErrorStrategy()
withErrorStrategy(
errorStrategy):this
Parameters
• errorStrategy: ErrorStrategy
Returns
this
Inherited from
BenchmarkBase.withErrorStrategy
Defined in
withIterations()
withIterations(
iterations):this
Parameters
• iterations: number
Returns
this
Defined in
withPerformanceObserver()
withPerformanceObserver(
options?):this
Parameters
• options?: PerformanceObserverOptions
Returns
this
Defined in
withReporter()
withReporter(
reporter):this
Parameters
• reporter: BenchmarkReporter
Returns
this
Defined in
withSetup()
withSetup(
setup):this
Parameters
• setup: SetupMethod
Returns
this
Overrides
BenchmarkBase.withSetup
Defined in
withSetupEach()
withSetupEach(
setup):this
Parameters
• setup: SetupMethod
Returns
this
Inherited from
BenchmarkBase.withSetupEach
Defined in
withTeardown()
withTeardown(
teardown):this
Parameters
• teardown: TeardownMethod
Returns
this
Overrides
BenchmarkBase.withTeardown
Defined in
withTeardownEach()
withTeardownEach(
teardown):this
Parameters
• teardown: TeardownMethod
Returns
this
Inherited from
BenchmarkBase.withTeardownEach
Defined in
withTimeout()
withTimeout(
timeout):this
Parameters
• timeout: number
Returns
this
Defined in
withVariation()
withVariation(name, builder)
withVariation(
name,builder):this
Parameters
• name: string
• builder
Returns
this
Defined in
withVariation(variation)
withVariation(
variation):this
Parameters
• variation: Variation
Returns
this
Defined in
withVariations()
withVariations(
variations):this
Parameters
• variations: Variation[]
Returns
this