Docs: Update benchmark for minimax/minimax-m2.5

This commit is contained in:
github-actions[bot]
2026-02-12 16:36:02 +00:00
parent 4eff5b0809
commit 42bc15a261
12 changed files with 228 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://cdn.jsdelivr.net/npm/papaparse@5.4.1/+esm');
const { data } = Papa.parse(csv, { header: true });
const groups = {};
for (const row of data) {
if (row[filterColumn] == filterValue) {
const key = row[groupBy];
(groups[key] ??= []).push(row);
}
}
return Object.entries(groups).map(([key, rows]) => {
const result = operation === 'count'
? rows.length
: (() => {
const sum = rows.reduce((acc, r) => acc + (Number(r[aggregateColumn]) || 0), 0);
return operation === 'sum' ? sum : sum / rows.length;
})();
return { [groupBy]: key, result };
});
}
export default processCSV;
// Generation time: 58.093s
// Result: PASS