Docs: Update benchmark for google/gemini-3-flash-preview

This commit is contained in:
github-actions[bot]
2025-12-17 16:44:44 +00:00
parent 36b2e04fc3
commit 0bea7a0d26
11 changed files with 263 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
export const processCSV = async (csv, { filterColumn, filterValue, groupBy, aggregateColumn, operation }) => {
const [{ parse }, { groupBy: group, sum: total }] = await Promise.all([
import('https://cdn.jsdelivr.net/npm/papaparse@5.4.1/+esm'),
import('https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/+esm')
]);
const { data } = parse(csv, {
header: true,
skipEmptyLines: true
});
const filtered = data.filter(r => r[filterColumn] == filterValue);
const collections = group(filtered, groupBy);
return Object.entries(collections).map(([key, rows]) => {
const values = rows.map(r => +r[aggregateColumn] || 0);
const s = total(values);
const n = values.length;
const calculations = {
sum: s,
avg: s / n,
count: n
};
return {
[groupBy]: key,
result: calculations[operation]
};
});
};
export default processCSV;
// Generation time: 41.061s
// Result: FAIL