Skip to content

Commit 164f0c3

Browse files
committed
fix top level benchmarks
1 parent 2783365 commit 164f0c3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/scripts/analyze_benchmarks/extractor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { readFile } from 'fs/promises';
22

33
export type BenchmarkEntry = {
4-
instructions: { __bigint__: string };
4+
instructions: string;
55
method_name: string;
6-
timestamp: { __bigint__: string };
6+
timestamp: string;
77
};
88

99
type VersionBenchmarks = {

.github/scripts/analyze_benchmarks/statistics.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ const BASELINE_EFFICIENCY_WEIGHTS = {
2323
* @returns Statistical analysis of the benchmark data
2424
*/
2525
export function calculateVersionStatistics(
26-
entries: BenchmarkEntry[]
26+
entries: BenchmarkEntry[] | undefined
2727
): Statistics {
28-
const instructions = entries.map((entry) =>
29-
Number(entry.instructions.__bigint__)
30-
);
28+
if (entries === undefined || entries.length === 0) {
29+
throw new Error('No benchmark entries found for this version');
30+
}
31+
32+
const instructions = entries.map((entry) => Number(entry.instructions));
3133

3234
return calculateStatistics(instructions);
3335
}

0 commit comments

Comments
 (0)