You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`async run()`: run the added tasks that were registered using the `add` method
146
-
-`async runConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: similar to the `run` method but runs concurrently rather than sequentially. See the [Concurrency](#Concurrency) section.
147
-
-`async warmup()`: warm up the benchmark tasks
148
-
-`async warmupConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: warm up the benchmark tasks concurrently
144
+
-`async runConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: similar to the `run` method but runs concurrently rather than sequentially. See the [Concurrency](#Concurrency) section.
145
+
-`async warmup()`: warmup the benchmark tasks
146
+
-`async warmupConcurrently(threshold: number = Infinity, mode: "bench" | "task" = "bench")`: warmup the benchmark tasks concurrently
149
147
-`reset()`: reset each task and remove its result
150
148
-`add(name: string, fn: Fn, opts?: FnOpts)`: add a benchmark task to the task map
151
149
-`Fn`: `() => any | Promise<any>`
@@ -176,7 +174,7 @@ function has been executed.
176
174
-`runs: number`: the number of times the task function has been executed
177
175
-`result?: TaskResult`: the result object
178
176
-`async run()`: run the current task and write the results in `Task.result` object
179
-
-`async warmup()`: warm up the current task
177
+
-`async warmup()`: warmup the current task
180
178
-`setResult(result: Partial<TaskResult>)`: change the result object values
181
179
-`reset()`: reset the task to make the `Task.runs` a zero-value and remove the `Task.result` object
182
180
@@ -210,7 +208,6 @@ the benchmark task result object.
210
208
211
209
```ts
212
210
exporttypeTaskResult= {
213
-
214
211
/*
215
212
* the last error that was thrown while running the task
216
213
*/
@@ -318,40 +315,33 @@ in each class instance using the universal `addEventListener` and
318
315
* Bench events
319
316
*/
320
317
exporttypeBenchEvents=
321
-
|"abort"// when a signal aborts
322
-
|"complete"// when running a benchmark finishes
323
-
|"error"// when the benchmark task throws
324
-
|"reset"// when the reset function gets called
325
-
|"start"// when running the benchmarks gets started
326
-
|"warmup"// when the benchmarks start getting warmed up (before start)
327
-
|"cycle"// when running each benchmark task gets done (cycle)
328
-
|"add"// when a Task gets added to the Bench
329
-
|"remove"// when a Task gets removed of the Bench
330
-
|"todo"; // when a todo Task gets added to the Bench
318
+
|'abort'// when a signal aborts
319
+
|'complete'// when running a benchmark finishes
320
+
|'error'// when the benchmark task throws
321
+
|'reset'// when the reset function gets called
322
+
|'start'// when running the benchmarks gets started
323
+
|'warmup'// when the benchmarks start getting warmed up (before start)
324
+
|'cycle'// when running each benchmark task gets done (cycle)
325
+
|'add'// when a Task gets added to the Bench
326
+
|'remove'// when a Task gets removed of the Bench
327
+
|'todo'; // when a todo Task gets added to the Bench
0 commit comments