Executes 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.Optional
Readonly
nameThe benchmark name.
Readonly
optsThe options.
Readonly
runtimeThe JavaScript runtime environment.
Readonly
runtimeThe JavaScript runtime version.
The maximum number of concurrent tasks to run
Optional
options: boolean | AddEventListenerOptionsget a task based on the task name
the task name
the Task instance
remove a benchmark task from the task map
the task name
the Bench instance
Optional
options: boolean | EventListenerOptionsreset tasks and remove their result
table of the tasks results
Optional
convert: (task: Task) => Record<string, number | string | undefined>an optional callback to convert the task result to a table record
the tasks results as an array of table records
The Bench class keeps track of the benchmark tasks and controls them.