Docs: Update benchmark for z-ai/glm-4.7

This commit is contained in:
github-actions[bot]
2025-12-23 02:30:02 +00:00
parent 4d6e0294fc
commit 401af17eb6
11 changed files with 217 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
const processCSV = async (csv, c) => {
const { default: { parse } } = await import('https://esm.sh/papaparse');
const { data } = parse(csv, { header: true });
const groups = data.reduce((a, r) => {
if (r[c.filterColumn] == c.filterValue) {
const k = r[c.groupBy];
const v = Number(r[c.aggregateColumn]) || 0;
if (!a[k]) a[k] = { sum: 0, count: 0 };
a[k].sum += v;
a[k].count++;
}
return a;
}, {});
return Object.entries(groups).map(([k, g]) => ({
[c.groupBy]: k,
result: c.operation === 'avg' ? g.sum / g.count :
c.operation === 'count' ? g.count : g.sum
}));
};
export default processCSV;
// Generation time: 169.513s
// Result: PASS