Skip to main content

OpenLoopScenario

@webda/bench


Interface: OpenLoopScenario

Defined in: packages/bench/src/runner.ts:89

Scenario starting operations at a fixed rate, whatever the previous ones completed or not

The latency is measured from the scheduled start of the operation, not its actual start, so a slow backend cannot hide its queueing delay (coordinated omission).

Extends​

Properties​

drainTimeoutMs?​

optional drainTimeoutMs?: number

Defined in: packages/bench/src/runner.ts:105

Maximum time to wait for operations still running at the end, defaults to the profile drainTimeoutMs


durationMs?​

optional durationMs?: number

Defined in: packages/bench/src/runner.ts:97

Duration of the measurement, defaults to the profile openLoopDurationMs


name​

name: string

Defined in: packages/bench/src/runner.ts:35

Scenario name, prefixed by the suite: store.get

Inherited from​

BaseScenario.name


params?​

optional params?: BenchParams

Defined in: packages/bench/src/runner.ts:39

Parameters of this run, part of the result key

Inherited from​

BaseScenario.params


ratePerSec​

ratePerSec: number

Defined in: packages/bench/src/runner.ts:93

Operations started per second


warmupOps?​

optional warmupOps?: number

Defined in: packages/bench/src/runner.ts:101

Discarded operations run sequentially before, defaults to min(profile warmupOps, 10)

Methods​

op()​

op(index): Promise<void>

Defined in: packages/bench/src/runner.ts:111

One operation: resolves when complete, e.g. when the message is received

Parameters​

index​

number

unique index of the operation in the scenario: warmup operations come first

Returns​

Promise<void>


setup()?​

optional setup(): Promise<void>

Defined in: packages/bench/src/runner.ts:43

Prepare the scenario, not measured

Returns​

Promise<void>

Inherited from​

BaseScenario.setup


teardown()?​

optional teardown(): Promise<void>

Defined in: packages/bench/src/runner.ts:47

Clean after the scenario, not measured

Returns​

Promise<void>

Inherited from​

BaseScenario.teardown


verify()?​

optional verify(): Promise<ScenarioChecks>

Defined in: packages/bench/src/runner.ts:51

Check the correctness after the measurement, not measured

Returns​

Promise<ScenarioChecks>

Inherited from​

BaseScenario.verify