MCPcopy Create free account
hub / github.com/modem-dev/hunk / loadBenchmarkRun

Function loadBenchmarkRun

scripts/compare-release-benchmarks.ts:134–140  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

132
133/** Read and lightly validate one benchmark JSON file. */
134export async function loadBenchmarkRun(filePath: string): Promise<BenchmarkRunResult> {
135 const result = JSON.parse(await Bun.file(filePath).text()) as BenchmarkRunResult;
136 if (result.version !== 1 || !Array.isArray(result.results)) {
137 throw new Error(`Invalid benchmark result file: ${filePath}`);
138 }
139 return result;
140}
141
142/** Determine whether a comparable metric exceeded its material-regression threshold. */
143export function isMaterialRegression(

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected