Docs: Update benchmark for anthropic/claude-opus-4.8 EFF:medium

This commit is contained in:
github-actions[bot]
2026-05-31 18:07:47 +00:00
parent 39d0a9f316
commit e5f1b816d1
12 changed files with 413 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
async function createStreamVisualizer(asyncIterable, options) {
const { maxPoints, alpha, width, height, yDomain } = options;
const { scaleLinear, line } = await import("https://cdn.skypack.dev/d3");
const data = [];
let prevEma;
for await (const value of asyncIterable) {
prevEma = prevEma === undefined ? value : alpha * value + (1 - alpha) * prevEma;
data.push({ timestamp: Date.now(), value, ema: prevEma });
if (data.length > maxPoints) data.splice(0, data.length - maxPoints);
}
const x = scaleLinear()
.domain([data[0]?.timestamp ?? 0, data.at(-1)?.timestamp ?? 1])
.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: 4.318s
// Result: FAIL