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

This commit is contained in:
github-actions[bot]
2026-05-31 18:07:47 +00:00
parent 39d0a9f316
commit e5f1b816d1
12 changed files with 413 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
const processCSV = async (csv, config) => {
const { filterColumn, filterValue, groupBy, aggregateColumn, operation } = config;
const [{ default: Papa }, { default: _ }] = await Promise.all([
import("https://esm.sh/papaparse@5.4.1"),
import("https://esm.sh/lodash-es@4.17.21")
]);
const { data } = Papa.parse(csv.trim(), { header: true, skipEmptyLines: true });
const num = v => {
const n = Number(v);
return isNaN(n) ? 0 : n;
};
const filtered = data.filter(r => r[filterColumn] == filterValue);
const groups = _.groupBy(filtered, r => r[groupBy]);
return _.map(groups, (rows, key) => {
const vals = rows.map(r => num(r[aggregateColumn]));
const sum = _.sum(vals);
const result =
operation === "sum" ? sum :
operation === "avg" ? sum / rows.length :
rows.length;
return { [groupBy]: key, result };
});
};
export default processCSV;
// Generation time: 6.170s
// Result: PASS