/ perf / runner / src / benchmark-result-type.ts
benchmark-result-type.ts
 1  export type BenchmarkResults = {
 2      benchmarks: Benchmark[],
 3      pings: PingResults,
 4      iperf: IperfResults,
 5      // For referencing this schema in JSON
 6      "$schema"?: string
 7  };
 8  
 9  export type PingResults = {
10      unit: "s",
11      results: number[]
12  };
13  
14  export type IperfResults = {
15      unit: "bit/s",
16      results: number[]
17  };
18  
19  export type Benchmark = {
20      name: string,
21      unit: "bit/s" | "s",
22      results: Result[],
23      parameters:
24  }
25  
26  export type Parameters = {
27      uploadBytes: number,
28      downloadBytes: number,
29  }
30  
31  export type Result = {
32      implementation: string,
33      transportStack: string,
34      version: string
35      result: ResultValue[],
36  };
37  
38  export type ResultValue = {
39      type: "itermediate" | "final",
40      time_seconds: number,
41      upload_bytes: number,
42      download_bytes: number,
43  };
44  
45  export type Comparison = {
46      name: string,
47      result: number,
48  }