1/**
2 * A container for raw benchmark data.
3 *
4 * Can be extended to store descriptive statistics about the raw data.
5 */
6export interface ChartData<T> {
7  values: T[];
8}
9
10/**
11 * Keeps track of ranges for various metrics. So distributions have a consistent range.
12 */
13export interface Range {
14  label: string;
15  min: number;
16  max: number;
17}
18
19/**
20 * A container for a Metric.
21 *
22 * This metric has all relevant comparables, in the data keyed by the source.
23 */
24export interface Metric<T> {
25  class: string;
26  benchmark: string;
27  label: string;
28  data: Record<string, ChartData<T>>;
29}
30
31/**
32 * A container for standard and sampled `Metric` instances.
33 */
34export interface Metrics<T = number> {
35  standard?: Metric<T>[];
36  sampled?: Metric<T[]>[];
37}
38