Docs: Update benchmark for anthropic/claude-opus-4.7 EFF:medium

This commit is contained in:
github-actions[bot]
2026-04-17 01:01:24 +00:00
parent 3eae200580
commit e58cbc2af2
12 changed files with 357 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
async function processCSV(csv, { filterColumn, filterValue, groupBy, aggregateColumn, operation }) {
const { default: Papa } = await import('https://esm.sh/papaparse@5.4.1');
const { data } = Papa.parse(csv, { header: true, skipEmptyLines: true });
const groups = {};
for (const row of data) {
if (row[filterColumn] != filterValue) continue;
const key = row[groupBy];
const n = Number(row[aggregateColumn]);
const val = Number.isFinite(n) ? n : 0;
(groups[key] ??= { sum: 0, count: 0 });
groups[key].sum += val;
groups[key].count++;
}
const calc = {
sum: g => g.sum,
avg: g => g.sum / g.count,
count: g => g.count,
}[operation];
return Object.entries(groups).map(([k, g]) => ({ [groupBy]: k, result: calc(g) }));
}
export default processCSV;
// Generation time: 5.004s
// Result: PASS