OptionalconcurrencyExecutes tasks concurrently based on the specified concurrency mode.
mode is set to null (default), concurrency is disabled.mode is set to 'task', each task's iterations (calls of a task function) run concurrently.mode is set to 'bench', different tasks within the bench run concurrently.OptionaliterationsThe number of times that a task should run if even the time option is finished.
OptionalnameBenchmark name.
OptionalnowFunction to get the current timestamp in milliseconds.
OptionalretainKeep samples for statistics calculation
OptionalsetupSetup function to run before each benchmark task (cycle)
OptionalsignalAn AbortSignal for aborting the benchmark.
OptionalteardownTeardown function to run after each benchmark task (cycle).
OptionalthresholdThe maximum number of concurrent tasks to run
OptionalthrowsThrows if a task fails.
OptionaltimeTime needed for running a benchmark task in milliseconds.
OptionaltimestampThe timestamp provider used by the benchmark. By default 'performance.now' will be used.
OptionalwarmupWarmup benchmark.
OptionalwarmupWarmup iterations.
OptionalwarmupWarmup time in milliseconds.
Bench options