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,19 @@
export async function createStreamVisualizer(asyncIterable, options) {
const { maxPoints = 1000, alpha = 0.1, width = 800, height = 400, yDomain = [0, 100] } = options || {};
const d3 = await import('d3');
const data = [];
let prevEma;
for await (const { timestamp, value } of asyncIterable) {
prevEma = prevEma === undefined ? value : alpha * value + (1 - alpha) * prevEma;
data.push({ timestamp, value, ema: prevEma });
if (data.length > maxPoints) data.shift();
}
if (!data.length) return { data: [], path: '' };
const x = d3.scaleLinear().domain([data[0].timestamp, data[data.length - 1].timestamp]).range([0, width]);
const y = d3.scaleLinear().domain(yDomain).range([height, 0]);
const path = d3.line().x(d => x(d.timestamp)).y(d => y(d.ema))(data) || '';
return { data, path };
}
export default createStreamVisualizer;
// Generation time: 53.348s
// Result: FAIL