Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion apps/landing/src/app/benchmark-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,29 @@ import fixture from '../../../../e2e/fixtures/benchmark-results.json'
export const BENCHMARK_SOURCE =
process.env.LANDING_BENCHMARK_DATA === 'fixture' ? 'fixture' : 'live'

export const benchmarkResults: typeof live =
/**
* What the landing page reads of a benchmark-results.json. Both files fit it:
* the frozen fixture records no client bytes (`null`), while a live run does,
* so neither file's inferred type can stand for the other.
*/
export interface BenchmarkResults {
run: {
id: string
url: string
commit: string
next: string
devupUi: string
sha: string
}
samples: number
rows: readonly {
table: string
target: string
version: string
median: number
bytes: number
}[]
}

export const benchmarkResults: BenchmarkResults =
BENCHMARK_SOURCE === 'fixture' ? fixture : live
Loading