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
* the last error that was thrown while running the task
199
+
* the last task error that was thrown
199
200
*/
200
-
error?:unknown;
201
+
error?:Error;
201
202
202
203
/**
203
-
* The amount of time in milliseconds to run the benchmark task (cycle).
204
+
* the time to run the task benchmark cycle (ms)
204
205
*/
205
206
totalTime:number;
206
207
207
208
/**
208
-
* the minimum value in the samples
209
+
* how long each operation takes (ms)
209
210
*/
210
-
min:number;
211
+
period:number;
212
+
211
213
/**
212
-
* the maximum value in the samples
214
+
* the task latency statistics
213
215
*/
214
-
max:number;
216
+
latency:Statistics;
217
+
218
+
/**
219
+
* the task throughput statistics
220
+
*/
221
+
throughput:Statistics;
215
222
216
223
/**
217
224
* the number of operations per second
225
+
* @deprecated use `.throughput.mean` instead
218
226
*/
219
227
hz:number;
220
228
221
229
/**
222
-
* how long each operation takes (ms)
230
+
* latency samples (ms)
231
+
* @deprecated use `.latency.samples` instead
223
232
*/
224
-
period:number;
233
+
samples:number[];
225
234
226
235
/**
227
-
* task samples of each task iteration time (ms)
236
+
* the minimum latency samples value
237
+
* @deprecated use `.latency.min` instead
228
238
*/
229
-
samples:number[];
239
+
min:number;
240
+
/**
241
+
* the maximum latency samples value
242
+
* @deprecated use `.latency.max` instead
243
+
*/
244
+
max:number;
230
245
231
246
/**
232
-
* samples mean/average (estimate of the population mean)
247
+
* the latency samples mean/average (estimate of the population mean/average)
248
+
* @deprecated use `.latency.mean` instead
233
249
*/
234
250
mean:number;
235
251
236
252
/**
237
-
* samples variance (estimate of the population variance)
253
+
* the latency samples variance (estimate of the population variance)
254
+
* @deprecated use `.latency.variance` instead
238
255
*/
239
256
variance:number;
240
257
241
258
/**
242
-
* samples standard deviation (estimate of the population standard deviation)
259
+
* the latency samples standard deviation (estimate of the population standard deviation)
260
+
* @deprecated use `.latency.sd` instead
243
261
*/
244
262
sd:number;
245
263
246
264
/**
247
-
* standard error of the mean (a.k.a. the standard deviation of the sampling distribution of the sample mean)
265
+
* the latency standard error of the mean (a.k.a. the standard deviation of the sampling distribution of the sample mean/average)
266
+
* @deprecated use `.latency.sem` instead
248
267
*/
249
268
sem:number;
250
269
251
270
/**
252
-
* degrees of freedom
271
+
* the latency samples degrees of freedom
272
+
* @deprecated use `.latency.df` instead
253
273
*/
254
274
df:number;
255
275
256
276
/**
257
-
* critical value of the samples
277
+
* the latency samples critical value
278
+
* @deprecated use `.latency.critical` instead
258
279
*/
259
280
critical:number;
260
281
261
282
/**
262
-
* margin of error
283
+
* the latency samples margin of error
284
+
* @deprecated use `.latency.moe` instead
263
285
*/
264
286
moe:number;
265
287
266
288
/**
267
-
* relative margin of error
289
+
* the latency samples relative margin of error
290
+
* @deprecated use `.latency.rme` instead
268
291
*/
269
292
rme:number;
270
293
271
294
/**
272
-
* median absolute deviation
273
-
*/
274
-
mad:number;
275
-
276
-
/**
277
-
* p50/median percentile
278
-
*/
279
-
p50:number;
280
-
281
-
/**
282
-
* p75 percentile
295
+
* the latency samples p75 percentile
296
+
* @deprecated use `.latency.p75` instead
283
297
*/
284
298
p75:number;
285
299
286
300
/**
287
-
* p99 percentile
301
+
* the latency samples p99 percentile
302
+
* @deprecated use `.latency.p99` instead
288
303
*/
289
304
p99:number;
290
305
291
306
/**
292
-
* p995 percentile
307
+
* the latency samples p995 percentile
308
+
* @deprecated use `.latency.p995` instead
293
309
*/
294
310
p995:number;
295
311
296
312
/**
297
-
* p999 percentile
313
+
* the latency samples p999 percentile
314
+
* @deprecated use `.latency.p999` instead
298
315
*/
299
316
p999:number;
300
317
}
301
318
```
302
319
320
+
[Statistics](https://github.com/tinylibs/tinybench/blob/main/src/types.ts#L30) type definition.
321
+
303
322
### `Events`
304
323
305
324
Both the `Task` and `Bench` objects extend the `EventTarget` object, so you can attach listeners to different types of events
0 commit comments