The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
ReadonlyconcurrencyExecutes 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.ReadonlyiterationsThe amount of executions per task.
ReadonlynameThe benchmark name.
ReadonlynowA function to get a timestamp.
Removes a previously registered event listener.
ReadonlyretainShould samples be retained for further custom processing
ReadonlyruntimeThe JavaScript runtime environment.
ReadonlyruntimeThe JavaScript runtime version.
ReadonlysetupA setup function that runs before each task execution.
ReadonlysignalAn AbortSignal to cancel the benchmark.
ReadonlyteardownA teardown function that runs after each task execution.
ReadonlythresholdThe maximum number of concurrent tasks to run
ReadonlythrowsWhether to throw an error if a task function throws
ReadonlytimeThe amount of time to run each task.
ReadonlytimestampA timestamp provider and its related functions.
ReadonlywarmupWhether to warmup the tasks before running them
ReadonlywarmupThe amount of warmup iterations per task.
ReadonlywarmupThe amount of time to warmup each task.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Gets a task based on the task name.
the task name
the Task instance or undefined if not found
Removes a benchmark task from the task map.
the task name
the Bench instance
Resets all tasks and removes their results.
Returns the tasks results as a table.
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.