Adds a listener for the specified event type.
Optionaloptions: boolean | AddEventListenerOptionsThe addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsExecutes tasks concurrently based on the specified concurrency mode, if set.
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.The amount of executions per task.
A function to get a timestamp.
Removes a previously registered event listener.
Optionaloptions: boolean | EventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsShould samples be retained for further custom processing
The JavaScript runtime environment.
The JavaScript runtime version.
A setup function that runs before each task execution.
OptionalsignalAn AbortSignal to cancel the benchmark
A teardown function that runs after each task execution.
The maximum number of concurrent tasks to run
Whether to throw an error if a task function throws
The amount of time to run each task.
Optional ReadonlytimerThe estimated cost of one timestamp provider call in milliseconds.
Calibrated once at construction; undefined (or omitted) when timer
overhead subtraction is disabled or unsupported by the implementation.
The timestamp provider used by the benchmark.
Whether to warmup the tasks before running them
The amount of warmup iterations per task.
The 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. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Used to decouple Bench and Task