File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -514,6 +514,119 @@ export interface Options {
514514 teardown? : Hook
515515}
516516```
517+ After the test case is run, the output structure information is as follows:
518+
519+ ```
520+ name hz min max mean p75 p99 p995 p999 rme samples
521+ · normal sorting 6,526,368.12 0.0001 0.3638 0.0002 0.0002 0.0002 0.0002 0.0004 ±1.41% 652638
522+ ```
523+ ``` ts
524+ export interface TaskResult {
525+ /*
526+ * the last error that was thrown while running the task
527+ */
528+ error? : unknown
529+
530+ /**
531+ * The amount of time in milliseconds to run the benchmark task (cycle).
532+ */
533+ totalTime: number
534+
535+ /**
536+ * the minimum value in the samples
537+ */
538+ min: number
539+ /**
540+ * the maximum value in the samples
541+ */
542+ max: number
543+
544+ /**
545+ * the number of operations per second
546+ */
547+ hz: number
548+
549+ /**
550+ * how long each operation takes (ms)
551+ */
552+ period: number
553+
554+ /**
555+ * task samples of each task iteration time (ms)
556+ */
557+ samples: number []
558+
559+ /**
560+ * samples mean/average (estimate of the population mean)
561+ */
562+ mean: number
563+
564+ /**
565+ * samples variance (estimate of the population variance)
566+ */
567+ variance: number
568+
569+ /**
570+ * samples standard deviation (estimate of the population standard deviation)
571+ */
572+ sd: number
573+
574+ /**
575+ * standard error of the mean (a.k.a. the standard deviation of the sampling distribution of the sample mean)
576+ */
577+ sem: number
578+
579+ /**
580+ * degrees of freedom
581+ */
582+ df: number
583+
584+ /**
585+ * critical value of the samples
586+ */
587+ critical: number
588+
589+ /**
590+ * margin of error
591+ */
592+ moe: number
593+
594+ /**
595+ * relative margin of error
596+ */
597+ rme: number
598+
599+ /**
600+ * median absolute deviation
601+ */
602+ mad: number
603+
604+ /**
605+ * p50/median percentile
606+ */
607+ p50: number
608+
609+ /**
610+ * p75 percentile
611+ */
612+ p75: number
613+
614+ /**
615+ * p99 percentile
616+ */
617+ p99: number
618+
619+ /**
620+ * p995 percentile
621+ */
622+ p995: number
623+
624+ /**
625+ * p999 percentile
626+ */
627+ p999: number
628+ }
629+ ```
517630
518631### bench.skip
519632
You can’t perform that action at this time.
0 commit comments