Docs: Update benchmark for google/gemini-3.1-flash-lite

This commit is contained in:
github-actions[bot]
2026-05-18 03:02:46 +00:00
parent 542af993bf
commit ebeee1ab97
12 changed files with 349 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
async function createStreamVisualizer(it, { maxPoints, alpha, width, height, yDomain }) {
const [{ scaleLinear, line, extent }] = await Promise.all([import('https://cdn.skypack.dev/d3')]);
const data = [];
let prevEma;
for await (const { timestamp, value } of it) {
prevEma = prevEma === undefined ? value : alpha * value + (1 - alpha) * prevEma;
data.push({ timestamp, value, ema: prevEma });
if (data.length > maxPoints) data.shift();
}
const x = scaleLinear().domain(extent(data, d => d.timestamp)).range([0, width]);
const y = scaleLinear().domain(yDomain).range([height, 0]);
const path = line().x(d => x(d.timestamp)).y(d => y(d.ema))(data);
return { data, path };
}
export default createStreamVisualizer;
// Generation time: 1.461s
// Result: PASS