mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-04-27 19:52:14 +00:00
Docs: Update benchmark for deepseek/deepseek-v4-pro
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const createStreamVisualizer = async (feed, { p = 1000, a = .25, w, h, y }) => {
|
||||
const d3 = (await import('https://esm.sh/d3@7')).default
|
||||
const data = []
|
||||
for await (const { timestamp: t, value: v } of feed) {
|
||||
const e = data.length ? a * v + (1 - a) * data[data.length - 1].ema : v
|
||||
data.push({ timestamp: t, value: v, ema: e })
|
||||
if (data.length > p) data.shift()
|
||||
}
|
||||
if (!data.length) return { data: [], path: '' }
|
||||
const x = d3.scaleLinear()
|
||||
.domain([data[0].timestamp, data[data.length - 1].timestamp])
|
||||
.range([0, w])
|
||||
const y = d3.scaleLinear()
|
||||
.domain(y)
|
||||
.range([h, 0])
|
||||
const line = d3.line()
|
||||
.x(d => x(d.timestamp))
|
||||
.y(d => y(d.ema))
|
||||
return { data, path: line(data) }
|
||||
}
|
||||
export default createStreamVisualizer;
|
||||
// Generation time: 71.592s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user