-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample-report.html
More file actions
513 lines (494 loc) · 33.2 KB
/
Copy pathexample-report.html
File metadata and controls
513 lines (494 loc) · 33.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BetterBench — Qwen3.8</title>
<style>
:root {
color-scheme: light;
--page:#f9f9f7; --surface:#fcfcfb;
--ink:#0b0b0b; --ink-2:#52514e; --muted:#898781;
--grid:#e1e0d9; --axis:#c3c2b7; --border:rgba(11,11,11,0.10);
--s1:#2a78d6; --s2:#eb6834;
--s1-mid:#86b6ef; --s1-soft:rgba(42,120,214,0.13);
--tip-bg:#ffffff;
--sans:system-ui,-apple-system,"Segoe UI",sans-serif;
--mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--page:#0d0d0d; --surface:#1a1a19;
--ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781;
--grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,0.10);
--s1:#3987e5; --s2:#d95926;
--s1-mid:#256abf; --s1-soft:rgba(57,135,229,0.16);
--tip-bg:#232322;
}
}
:root[data-theme="dark"] {
color-scheme: dark;
--page:#0d0d0d; --surface:#1a1a19;
--ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781;
--grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,0.10);
--s1:#3987e5; --s2:#d95926;
--s1-mid:#256abf; --s1-soft:rgba(57,135,229,0.16);
--tip-bg:#232322;
}
* { box-sizing:border-box; }
body { background:var(--page); color:var(--ink); font-family:var(--sans);
line-height:1.55; margin:0; padding:32px 20px 72px; }
.wrap { max-width:1080px; margin:0 auto; display:flex; flex-direction:column; gap:26px; }
header { display:flex; flex-direction:column; gap:13px; }
.eyebrow { font-family:var(--mono); font-size:11px; letter-spacing:.13em;
text-transform:uppercase; color:var(--muted); }
h1 { font-size:clamp(26px,4vw,36px); line-height:1.12; margin:0;
letter-spacing:-.02em; text-wrap:balance; }
.runbar { display:flex; flex-wrap:wrap; gap:8px; }
.chip { font-family:var(--mono); font-size:12px; color:var(--ink-2);
border:1px solid var(--border); border-radius:6px; padding:4px 9px;
background:var(--surface); display:inline-flex; align-items:center; gap:7px; }
.chip code { font-family:var(--mono); font-size:12px; }
.swatch { width:9px; height:9px; border-radius:2px; flex:none; }
.thin { color:var(--muted); cursor:help; font-weight:400; padding-left:1px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:13px; }
.tile { background:var(--surface); border:1px solid var(--border); border-radius:10px;
padding:15px 16px; display:flex; flex-direction:column; gap:4px; }
.tile .label { font-family:var(--mono); font-size:10.5px; letter-spacing:.1em;
text-transform:uppercase; color:var(--muted); }
.tile .val { font-size:26px; font-weight:600; letter-spacing:-.02em; line-height:1.15; }
.tile .val small { font-size:14px; font-weight:400; color:var(--ink-2); letter-spacing:0; }
.tile .sub { font-family:var(--mono); font-size:11.5px; color:var(--muted); }
figure { margin:0; background:var(--surface); border:1px solid var(--border);
border-radius:10px; padding:18px 18px 14px;
display:flex; flex-direction:column; gap:2px; }
figcaption { display:flex; flex-direction:column; gap:3px; margin-bottom:8px; }
figcaption .t { font-size:15.5px; font-weight:600; letter-spacing:-.01em; }
figcaption .d { font-size:13px; color:var(--ink-2); max-width:76ch; }
.legend { display:flex; gap:16px; flex-wrap:wrap; margin:2px 0 10px; }
.legend span { font-family:var(--mono); font-size:12px; color:var(--ink-2);
display:inline-flex; align-items:center; gap:6px; }
.chartbox { position:relative; width:100%; }
.chartbox svg { display:block; width:100%; height:auto; overflow:visible; }
.note { font-size:12.5px; color:var(--muted); margin:9px 0 0; }
text { font-family:var(--mono); }
.tick { font-size:10.5px; fill:var(--muted); }
.axtitle { font-size:10.5px; fill:var(--muted); letter-spacing:.08em; }
.dlabel { font-size:11px; font-weight:600; }
.gridline { stroke:var(--grid); stroke-width:1; }
.baseline { stroke:var(--axis); stroke-width:1; }
.refline { stroke:var(--muted); stroke-width:1; stroke-dasharray:4 4; }
.cross { stroke:var(--axis); stroke-width:1; stroke-dasharray:3 3; }
.tip { position:absolute; pointer-events:none; opacity:0; transition:opacity .1s ease;
z-index:5; background:var(--tip-bg); border:1px solid var(--border);
border-radius:7px; padding:8px 10px; box-shadow:0 3px 14px rgba(0,0,0,.13);
font-family:var(--mono); font-size:11.5px; color:var(--ink);
white-space:nowrap; min-width:132px; }
.tip .th { color:var(--muted); font-size:10px; letter-spacing:.08em;
text-transform:uppercase; margin-bottom:5px; }
.tip .row { display:flex; align-items:center; gap:10px; justify-content:space-between; }
.tip .nm { display:inline-flex; align-items:center; gap:6px; color:var(--ink-2); }
.tip b { font-weight:600; }
details { background:var(--surface); border:1px solid var(--border);
border-radius:10px; padding:0 18px; }
summary { cursor:pointer; padding:15px 0; font-size:14.5px; font-weight:600;
list-style:none; display:flex; align-items:center; gap:9px; }
summary::-webkit-details-marker { display:none; }
summary::before { content:"\25B8"; color:var(--muted); font-family:var(--mono); }
details[open] summary::before { content:"\25BE"; }
summary:focus-visible { outline:2px solid var(--s1); outline-offset:3px; border-radius:4px; }
.tscroll { overflow-x:auto; padding-bottom:14px; }
table { border-collapse:collapse; width:100%; font-size:12.5px; font-family:var(--mono);
font-variant-numeric:tabular-nums; margin-bottom:10px; }
caption { text-align:left; font-family:var(--sans); font-size:13px; color:var(--ink-2);
padding:10px 0 8px; }
th, td { padding:6px 11px 6px 0; text-align:right; white-space:nowrap; }
th:first-child, td:first-child { text-align:left; }
thead th { color:var(--muted); font-weight:500; font-size:10.5px; letter-spacing:.07em;
text-transform:uppercase; border-bottom:1px solid var(--axis); }
tbody tr + tr td { border-top:1px solid var(--grid); }
tbody td:first-child { color:var(--ink-2); }
footer { font-size:12.5px; color:var(--muted); border-top:1px solid var(--border);
padding-top:16px; }
footer code { font-family:var(--mono); font-size:12px; color:var(--ink-2); }
noscript p { font-size:13px; color:var(--ink-2); }
@media (prefers-reduced-motion: reduce) { * { transition:none !important; } }
</style>
</head>
<body>
<div class="wrap">
<header>
<div class="eyebrow">BetterBench 0.4.0 · 29 Aug 2026 · 14:29 · localhost.localdomain</div>
<h1>Qwen3.8</h1>
<div class="runbar"><span class="chip"><span class="swatch" style="background:var(--s1)"></span>Qwen3.8</span><span class="chip"><code>http://127.0.0.1:8080/v1</code></span><span class="chip">corpus v1.0</span><span class="chip">5 passes/cat</span><span class="chip">temp 0.7</span><span class="chip">cold prefix cache (nonce)</span><span class="chip">262,144 tok context</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>maxseqs: 16</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>kernel: full-stack</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>spec: 7</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>dynw: minbatch3</span></div>
</header>
<section class="tiles">
<div class="tile">
<span class="label">Combined decode</span>
<span class="val">176.4 <small>t/s</small></span>
<span class="sub">weighted across categories</span>
</div>
<div class="tile">
<span class="label">Combined update p99</span>
<span class="val">26.0 <small>ms</small></span>
<span class="sub">the stutter between stream updates</span>
</div>
<div class="tile">
<span class="label">Combined TTFT p50</span>
<span class="val">44 <small>ms</small></span>
<span class="sub">single-stream, batch = 1</span>
</div>
<div class="tile">
<span class="label">Aggregate @ 16 concurrent</span>
<span class="val">656.7 <small>t/s</small></span>
<span class="sub">48/48 ok</span>
</div>
<div class="tile">
<span class="label">Prefill @ 250,000 tok</span>
<span class="val">3,110 <small>t/s</small></span>
<span class="sub">median prompt processing</span>
</div>
</section>
<noscript><p>Charts need JavaScript — the full numbers are in the tables below.</p></noscript>
<figure>
<figcaption>
<span class="t">Decode throughput by category</span>
<span class="d">Median per-pass decode t/s at batch = 1, 5 passes per category. The dashed line is the weighted combined score.</span>
</figcaption>
<div class="chartbox" id="cb-decode"></div>
<p class="note">Hover a bar for its IQR and coefficient of variation — a high CV means the category's passes disagree, so read small differences there with care.</p>
</figure>
<figure>
<figcaption>
<span class="t">Stream-update gap by category</span>
<span class="d">This server packs several tokens into one stream update, so there is no per-token latency to plot. These are the measured wall-clock gaps between updates: p50 is the typical rhythm, p99 the stutter. Lower is better.</span>
</figcaption>
<div class="legend"><span><span class="swatch" style="background:var(--s1)"></span>update p50</span><span><span class="swatch" style="background:var(--s2)"></span>update p99</span></div>
<div class="chartbox" id="cb-itl"></div>
<p class="note">Hover a bar for the tokens landing per update. p99 is an upper bound on any pause a reader feels; it is not comparable across servers that pack different numbers of tokens into an update.</p>
</figure>
<figure>
<figcaption>
<span class="t">Aggregate throughput under concurrency</span>
<span class="d">Total tokens/sec across all in-flight requests as load rises — where this flattens is the throughput knee.</span>
</figcaption>
<div class="chartbox" id="cb-conc"></div>
</figure>
<figure>
<figcaption>
<span class="t">Time-to-first-token under concurrency</span>
<span class="d">Queueing shows up here first: p50 is the typical wait, p99 the tail.</span>
</figcaption>
<div class="legend"><span><span class="swatch" style="background:var(--s1)"></span>TTFT p50</span><span><span class="swatch" style="background:var(--s2)"></span>TTFT p99</span></div>
<div class="chartbox" id="cb-ttft"></div>
<p class="note">With a modest request count per level, p99 rests on very few observations — treat a spike as a prompt to re-run, not a conclusion.</p>
</figure>
<figure>
<figcaption>
<span class="t">Prompt processing throughput by depth</span>
<span class="d">Median prefill t/s (prompt tokens ÷ TTFT) at increasing input depth, cold prefix cache. The band spans the 1% low to the 99% high.</span>
</figcaption>
<div class="chartbox" id="cb-prefill"></div>
</figure>
<details open>
<summary>Full numbers</summary>
<div class="tscroll">
<table>
<caption>Single-stream, batch = 1 · several tokens per stream update</caption>
<thead><tr><th>category</th><th>passes</th><th>TTFT p50</th><th>TTFT p99</th><th>update p50 (ms)</th><th>update p99 (ms)</th><th>tok/update</th><th>decode med</th><th>±IQR</th><th>CV</th></tr></thead>
<tbody>
<tr><td>chat</td><td>5</td><td>50.1</td><td>54.6<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.2</td><td>25.6<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>2.69</td><td>106.9</td><td>4.3</td><td>7.7%</td></tr>
<tr><td>code</td><td>5</td><td>41.8</td><td>43.5<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.4</td><td>25.9</td><td>4.80</td><td>200.9</td><td>6.7</td><td>10.7%</td></tr>
<tr><td>file edit</td><td>5</td><td>50.0</td><td>65.2<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.4</td><td>25.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>5.91</td><td>246.7</td><td>35.0</td><td>10.8%</td></tr>
<tr><td>json</td><td>5</td><td>43.8</td><td>47.2<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.3</td><td>25.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>5.34</td><td>212.9</td><td>42.4</td><td>17.5%</td></tr>
<tr><td>math</td><td>5</td><td>41.8</td><td>49.6<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.5</td><td>26.0<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>5.43</td><td>212.4</td><td>7.2</td><td>16.2%</td></tr>
<tr><td>prose</td><td>5</td><td>39.6</td><td>47.6<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.6</td><td>26.1</td><td>2.61</td><td>107.6</td><td>13.6</td><td>10.2%</td></tr>
<tr><td>reasoning</td><td>5</td><td>43.9</td><td>48.0<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.5</td><td>26.1</td><td>3.20</td><td>126.2</td><td>52.9</td><td>28.0%</td></tr>
<tr><td>summarization</td><td>5</td><td>51.3</td><td>66.0<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>25.4</td><td>25.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4.46</td><td>181.6</td><td>24.6</td><td>11.2%</td></tr>
</tbody>
</table>
<table>
<caption>Concurrency sweep</caption>
<thead><tr><th>level</th><th>ok/req</th><th>aggregate t/s</th><th>TTFT p50</th><th>TTFT p99</th><th>per-req decode med</th></tr></thead>
<tbody>
<tr><td>1</td><td>48/48</td><td>156.7</td><td>44.1</td><td>67.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>200.0</td></tr>
<tr><td>2</td><td>48/48</td><td>270.2</td><td>77.0</td><td>104.0<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>177.5</td></tr>
<tr><td>4</td><td>48/48</td><td>406.5</td><td>89.1</td><td>162.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>146.5</td></tr>
<tr><td>8</td><td>48/48</td><td>540.3</td><td>116.8</td><td>236.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>99.4</td></tr>
<tr><td>16</td><td>48/48</td><td>656.7</td><td>195.7</td><td>394.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>64.6</td></tr>
</tbody>
</table>
<table>
<caption>Reasoning / answer split · TTFA is time to the first answer token</caption>
<thead><tr><th>category</th><th>runs w/ split</th><th>reasoning share (est)</th><th>TTFA p50 (ms)</th><th>never reached answer</th></tr></thead>
<tbody>
<tr><td>chat</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
<tr><td>code</td><td>5/5</td><td>91%</td><td>—</td><td>3/5</td></tr>
<tr><td>file edit</td><td>5/5</td><td>97%</td><td>—</td><td>3/5</td></tr>
<tr><td>json</td><td>5/5</td><td>65%</td><td>—</td><td>1/5</td></tr>
<tr><td>math</td><td>5/5</td><td>70%</td><td>—</td><td>2/5</td></tr>
<tr><td>prose</td><td>5/5</td><td>95%</td><td>—</td><td>4/5</td></tr>
<tr><td>reasoning</td><td>5/5</td><td>98%</td><td>—</td><td>4/5</td></tr>
<tr><td>summarization</td><td>5/5</td><td>56%</td><td>685.4</td><td>0/5</td></tr>
</tbody>
</table>
<table>
<caption>Prefill sweep · cold prefix cache</caption>
<thead><tr><th>target depth</th><th>prompt tok med</th><th>TTFT p50</th><th>PP 1% low</th><th>PP median</th><th>PP 99% high</th></tr></thead>
<tbody>
<tr><td>2,000</td><td>1,514</td><td>321.3</td><td>4,692.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4,713.2</td><td>4,721.2<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>8,000</td><td>5,918</td><td>1,219.0</td><td>4,847.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4,854.6</td><td>4,864.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>16,000</td><td>11,794</td><td>2,454.1</td><td>4,800.4<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4,805.4</td><td>4,814.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>32,000</td><td>23,543</td><td>5,057.5</td><td>4,642.4<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4,655.1</td><td>4,664.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>64,000</td><td>47,056</td><td>10,743.0</td><td>4,366.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>4,380.0</td><td>4,398.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>128,000</td><td>94,065</td><td>24,507.0</td><td>3,825.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>3,838.3</td><td>3,853.2<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
<tr><td>250,000</td><td>183,678</td><td>59,053.5</td><td>3,108.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>3,110.3</td><td>3,115.2<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
</tbody>
</table>
</div>
</details>
<footer>Generated by BetterBench 0.4.0 from a corpus v1.0 run. Corpus hash <code>e332dceff176d033</code>. Combined-score weights — code 0.3, reasoning 0.2, prose 0.15, json 0.15, file_edit 0.1, summarization 0.1. Results are only comparable within a corpus version. Stopped at <code>max_tokens</code>: 32/40 runs (80%) — on a thinking model a truncated run measures the thinking phase, not a complete answer. 25 percentiles are marked † — they rest on fewer samples than <code>n · tail ≥ 5</code> requires (a p99 needs 500 observations), so read them as roughly the worst observed rather than as percentiles. The full list is under <code>sample_gate</code> in the results JSON. See METHODOLOGY.md §sample-size.</footer>
</div>
<script>
"use strict";
const D = {"cats": ["chat", "code", "file edit", "json", "math", "prose", "reasoning", "summarization"], "runs": [5, 5, 5, 5, 5, 5, 5, 5], "decode": [106.882856978831, 200.9269839549829, 246.73655279384508, 212.85078462605088, 212.41244754183825, 107.61705847061485, 126.15532990772682, 181.63069863453003], "decodeIqr": [4.257579121791821, 6.735582551740009, 35.03221698019348, 42.378987136722316, 7.182446337432822, 13.588165936766416, 52.91189654617516, 24.641530966170905], "cv": [7.687618218351451, 10.689640067227128, 10.78081543317077, 17.49162598885317, 16.152996610485044, 10.157031595072901, 28.021096807035633, 11.202812084335461], "itlLow": [null, null, null, null, null, null, null, null], "itlMed": [null, null, null, null, null, null, null, null], "itlHigh": [null, null, null, null, null, null, null, null], "batched": true, "updP50": [25.206439080648124, 25.360448053106666, 25.393378105945885, 25.30671306885779, 25.451707071624696, 25.55513143306598, 25.540177011862397, 25.421837519388646], "updP99": [25.590029056183994, 25.916020825970918, 25.949049219489098, 25.789291462861, 25.979443034157157, 26.102102409349754, 26.104364605853334, 25.798729945672676], "tokPerUpd": [2.6923076923076925, 4.801324503311259, 5.90625, 5.336032388663968, 5.426008968609866, 2.6063348416289593, 3.1979045401629804, 4.455813953488372], "ttft50": [50.05058099050075, 41.84621095191687, 49.964862992055714, 43.76468400005251, 41.77516105119139, 39.5575090078637, 43.89396298211068, 51.250122021883726], "combined": 176.4160627753776, "conc": {"levels": [1, 2, 4, 8, 16], "agg": [156.66138606363887, 270.19096506633485, 406.46658877767965, 540.2830464542208, 656.7026492295109], "t50": [44.05359196243808, 76.9993860158138, 89.1263650264591, 116.7581845074892, 195.686339517124], "t99": [67.85020141396672, 104.01678542839365, 162.74733717320487, 236.743763058912, 394.77869850816205], "per": [200.04272162852445, 177.49019438200173, 146.51964508444706, 99.36058456796087, 64.62962609820568], "ok": [48, 48, 48, 48, 48], "req": [48, 48, 48, 48, 48]}, "pre": {"depths": [2000, 8000, 16000, 32000, 64000, 128000, 250000], "tok": [1514.0, 5917.5, 11793.5, 23543.0, 47055.5, 94065.0, 183677.5], "low": [4692.740288235821, 4847.795604188974, 4800.374513154436, 4642.4293129508205, 4366.928443772736, 3825.3444661888657, 3108.324575653883], "med": [4713.160895932782, 4854.630879035261, 4805.404023230054, 4655.127243672272, 4379.963790447149, 3838.3137000258994, 3110.3493681930513], "high": [4721.215649262693, 4864.947957843212, 4814.295039850736, 4664.812144971849, 4398.30225617619, 3853.2157390840257, 3115.170187944892], "t50": [321.3342545204796, 1219.0423114807345, 2454.112494539004, 5057.541841582861, 10743.023164570332, 24506.986552965827, 59053.49545850186]}};
const NS = "http://www.w3.org/2000/svg";
const el = (n, a) => { const e = document.createElementNS(NS, n);
for (const k in a) e.setAttribute(k, a[k]); return e; };
const fmt = (v, d) => (v === null || v === undefined) ? "—"
: v.toLocaleString("en-US", { minimumFractionDigits: d, maximumFractionDigits: d });
const has = v => v !== null && v !== undefined;
const maxOf = arrs => Math.max(...arrs.flat().filter(has));
const niceTop = v => { if (!(v > 0)) return 1;
const p = Math.pow(10, Math.floor(Math.log10(v)) - 1);
return Math.ceil(v / (2 * p)) * 2 * p; };
const box = id => document.getElementById(id);
function mkTip(b) { const t = document.createElement("div"); t.className = "tip";
b.appendChild(t); return t; }
function showTip(tip, b, x, y, html) {
tip.innerHTML = html; tip.style.opacity = "1";
let left = x + 14;
if (left + tip.offsetWidth > b.clientWidth) left = x - tip.offsetWidth - 14;
tip.style.left = Math.max(0, left) + "px";
tip.style.top = Math.max(0, y - tip.offsetHeight - 10) + "px";
}
const row = (color, name, val) =>
`<div class="row"><span class="nm">${color
? `<span class="swatch" style="background:${color}"></span>` : ""}${name}</span><b>${val}</b></div>`;
function frame(svg, M, iw, ih, yMin, yMax, yTitle, ticks) {
for (let k = 0; k <= (ticks || 4); k++) {
const v = yMin + ((yMax - yMin) * k) / (ticks || 4);
const y = M.t + ih - (ih * (v - yMin)) / (yMax - yMin);
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: y, y2: y, class: "gridline" }));
const tx = el("text", { x: M.l - 10, y: y + 3.5, class: "tick", "text-anchor": "end" });
tx.textContent = fmt(v, v < 10 ? 1 : 0); svg.appendChild(tx);
}
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: M.t + ih, y2: M.t + ih, class: "baseline" }));
const ay = el("text", { x: M.l, y: M.t - 7, class: "axtitle" });
ay.textContent = yTitle; svg.appendChild(ay);
}
function xLabels(svg, labels, X, y) {
labels.forEach((lab, i) => {
const t = el("text", { x: X(i), y: y, class: "tick", "text-anchor": "middle" });
t.textContent = lab; svg.appendChild(t);
});
}
/* --- grouped / single bars, zero-based --- */
function bars(id, o) {
const b = box(id); if (!b) return;
const W = 900, H = o.height || 340, M = { t: 20, r: 16, b: 50, l: 64 };
const iw = W - M.l - M.r, ih = H - M.t - M.b;
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
const n = o.x.length, yMax = o.yMax;
const Y = v => M.t + ih - (ih * v) / yMax;
frame(svg, M, iw, ih, 0, yMax, o.yTitle);
const band = iw / n, ns = o.series.length, GAP = 2;
const bw = Math.min(40, (band - 24 - GAP * (ns - 1)) / ns);
xLabels(svg, o.x, i => M.l + band * i + band / 2, M.t + ih + 20);
if (has(o.ref)) {
const y = Y(o.ref);
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: y, y2: y, class: "refline" }));
const t = el("text", { x: M.l + iw, y: y - 6, class: "tick", "text-anchor": "end" });
t.textContent = o.refLabel; svg.appendChild(t);
}
const tip = mkTip(b);
o.x.forEach((lab, i) => {
const cx = M.l + band * i + band / 2;
const start = cx - (ns * bw + (ns - 1) * GAP) / 2;
o.series.forEach((s, si) => {
const v = s.v[i]; if (!has(v)) return;
const x = start + si * (bw + GAP);
const r = el("rect", { x: x, y: Y(v), width: bw, height: Math.max(2, ih - (Y(v) - M.t)),
rx: 4, ry: 4, fill: s.color });
r.style.cursor = "crosshair";
const html = `<div class="th">${lab}</div>` +
o.series.map(q => row(ns > 1 ? q.color : null, q.name, o.tipVal(q.v[i]))).join("") +
(o.extra ? o.extra(i) : "");
r.addEventListener("pointerenter", () => {
const rc = svg.getBoundingClientRect();
showTip(tip, b, ((x + bw / 2) / W) * rc.width, (Y(v) / H) * rc.height, html);
});
r.addEventListener("pointerleave", () => { tip.style.opacity = "0"; });
svg.appendChild(r);
});
});
b.appendChild(svg);
}
/* --- floating range bars with a median tick --- */
function rangeBars(id, o) {
const b = box(id); if (!b) return;
const W = 900, H = 340, M = { t: 20, r: 16, b: 50, l: 64 };
const iw = W - M.l - M.r, ih = H - M.t - M.b;
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
const n = o.x.length, yMax = o.yMax;
const Y = v => M.t + ih - (ih * v) / yMax;
frame(svg, M, iw, ih, 0, yMax, o.yTitle);
const band = iw / n, bw = Math.min(34, band - 26);
xLabels(svg, o.x, i => M.l + band * i + band / 2, M.t + ih + 20);
const tip = mkTip(b);
o.x.forEach((lab, i) => {
const lo = o.low[i], hi = o.high[i], md = o.med[i];
if (!has(lo) || !has(hi)) return;
const cx = M.l + band * i + band / 2, x = cx - bw / 2;
const r = el("rect", { x: x, y: Y(hi), width: bw, height: Math.max(3, Y(lo) - Y(hi)),
rx: 4, ry: 4, fill: "var(--s1-mid)" });
r.style.cursor = "crosshair";
svg.appendChild(r);
if (has(md)) svg.appendChild(el("line", { x1: x, x2: x + bw, y1: Y(md), y2: Y(md),
stroke: "var(--ink)", "stroke-width": 2 }));
const html = `<div class="th">${lab}</div>` +
row(null, "99% high", o.tipVal(hi)) + row(null, "median", o.tipVal(md)) +
row(null, "1% low", o.tipVal(lo)) + (o.extra ? o.extra(i) : "");
r.addEventListener("pointerenter", () => {
const rc = svg.getBoundingClientRect();
showTip(tip, b, (cx / W) * rc.width, (Y(hi) / H) * rc.height, html);
});
r.addEventListener("pointerleave", () => { tip.style.opacity = "0"; });
});
b.appendChild(svg);
}
/* --- line chart with optional band --- */
function line(id, o) {
const b = box(id); if (!b) return;
const W = 900, H = 320, M = { t: 20, r: 24, b: 52, l: 64 };
const iw = W - M.l - M.r, ih = H - M.t - M.b;
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
const n = o.x.length, yMin = o.yMin, yMax = o.yMax;
const X = i => M.l + (n === 1 ? iw / 2 : (iw * i) / (n - 1));
const Y = v => M.t + ih - (ih * (v - yMin)) / (yMax - yMin);
frame(svg, M, iw, ih, yMin, yMax, o.yTitle);
xLabels(svg, o.x, X, M.t + ih + 20);
if (o.xTitle) {
const t = el("text", { x: M.l, y: H - 8, class: "axtitle" });
t.textContent = o.xTitle; svg.appendChild(t);
}
if (o.band && o.band.low.every(has) && o.band.high.every(has)) {
const up = o.band.high.map((v, i) => (i ? "L" : "M") + X(i) + " " + Y(v)).join(" ");
const dn = o.band.low.map((v, i) => "L" + X(n - 1 - i) + " " + Y(o.band.low[n - 1 - i])).join(" ");
svg.appendChild(el("path", { d: up + " " + dn + " Z", fill: "var(--s1-soft)", stroke: "none" }));
}
svg.appendChild(el("path", {
d: o.v.map((v, i) => (i ? "L" : "M") + X(i) + " " + Y(v)).join(" "),
fill: "none", stroke: "var(--s1)", "stroke-width": 2,
"stroke-linejoin": "round", "stroke-linecap": "round" }));
o.v.forEach((v, i) => svg.appendChild(el("circle", {
cx: X(i), cy: Y(v), r: 5, fill: "var(--s1)", stroke: "var(--surface)", "stroke-width": 2 })));
const cross = el("line", { class: "cross", y1: M.t, y2: M.t + ih, opacity: 0 });
svg.appendChild(cross);
const hit = el("rect", { x: M.l, y: M.t, width: iw, height: ih, fill: "transparent" });
svg.appendChild(hit);
b.appendChild(svg);
const tip = mkTip(b);
hit.addEventListener("pointermove", ev => {
const rc = svg.getBoundingClientRect();
const px = ((ev.clientX - rc.left) / rc.width) * W;
let i = 0, best = Infinity;
for (let k = 0; k < n; k++) { const d = Math.abs(X(k) - px); if (d < best) { best = d; i = k; } }
cross.setAttribute("x1", X(i)); cross.setAttribute("x2", X(i)); cross.setAttribute("opacity", 1);
showTip(tip, b, (X(i) / W) * rc.width, (Y(o.v[i]) / H) * rc.height,
`<div class="th">${o.tipHead(i)}</div>` + o.tipBody(i));
});
hit.addEventListener("pointerleave", () => { tip.style.opacity = "0"; cross.setAttribute("opacity", 0); });
}
/* ------------------------------ build ------------------------------ */
if (D.cats.length) {
bars("cb-decode", {
aria: "Median decode throughput per category.",
x: D.cats, yTitle: "DECODE T/S (MEDIAN)",
yMax: niceTop(maxOf([D.decode])), height: 350,
ref: D.combined, refLabel: "combined " + fmt(D.combined, 1),
series: [{ name: "decode t/s", color: "var(--s1)", v: D.decode }],
tipVal: v => fmt(v, 1) + " t/s",
extra: i => row(null, "±IQR", fmt(D.decodeIqr[i], 1)) +
row(null, "CV", fmt(D.cv[i], 1) + "%") +
row(null, "passes", D.runs[i])
});
if (D.batched) {
/* Grouped bars, not a floating range bar: p50 and p99 can differ by two
orders of magnitude (a 17 ms rhythm against a 1.3 s stall), and a bar
floating between them collapses the p50 end onto the axis. */
bars("cb-itl", {
aria: "Stream-update gap p50 and p99 by category.",
x: D.cats, yTitle: "UPDATE GAP (MS)",
yMax: niceTop(maxOf([D.updP99, D.updP50])), height: 320,
series: [{ name: "p50", color: "var(--s1)", v: D.updP50 },
{ name: "p99", color: "var(--s2)", v: D.updP99 }],
tipVal: v => fmt(v, 1) + " ms",
extra: i => row(null, "tok/update", fmt(D.tokPerUpd[i], 2)) +
row(null, "passes", D.runs[i])
});
} else {
rangeBars("cb-itl", {
aria: "Inter-token latency range per category, 1% low to 99% high.",
x: D.cats, yTitle: "INSTANTANEOUS T/S",
yMax: niceTop(maxOf([D.itlHigh])),
low: D.itlLow, med: D.itlMed, high: D.itlHigh,
tipVal: v => fmt(v, 1) + " t/s",
extra: i => row(null, "spread", has(D.itlHigh[i]) && has(D.itlLow[i])
? fmt(D.itlHigh[i] - D.itlLow[i], 1) + " t/s" : "—")
});
}
}
if (D.conc.levels.length > 1) {
line("cb-conc", {
aria: "Aggregate throughput as concurrency rises.",
x: D.conc.levels.map(String), xTitle: "CONCURRENCY LEVEL",
yTitle: "AGGREGATE T/S", yMin: 0, yMax: niceTop(maxOf([D.conc.agg])),
v: D.conc.agg,
tipHead: i => "concurrency " + D.conc.levels[i] + " · " + D.conc.ok[i] + "/" + D.conc.req[i] + " ok",
tipBody: i => row(null, "aggregate", fmt(D.conc.agg[i], 1) + " t/s") +
row(null, "per-req", fmt(D.conc.per[i], 1) + " t/s") +
row(null, "TTFT p50", fmt(D.conc.t50[i], 1) + " ms")
});
bars("cb-ttft", {
aria: "TTFT p50 and p99 by concurrency level.",
x: D.conc.levels.map(String), yTitle: "TTFT (MS)",
yMax: niceTop(maxOf([D.conc.t99, D.conc.t50])), height: 300,
series: [{ name: "p50", color: "var(--s1)", v: D.conc.t50 },
{ name: "p99", color: "var(--s2)", v: D.conc.t99 }],
tipVal: v => fmt(v, 1) + " ms",
extra: i => row(null, "requests", D.conc.ok[i] + "/" + D.conc.req[i])
});
}
if (D.pre.depths.length > 1) {
const lo = Math.min(...D.pre.low.filter(has).concat(D.pre.med.filter(has)));
const hi = Math.max(...D.pre.high.filter(has).concat(D.pre.med.filter(has)));
const pad = (hi - lo) * 0.25 || hi * 0.1;
line("cb-prefill", {
aria: "Prefill throughput by input depth.",
x: D.pre.depths.map(d => d >= 1000 ? (d / 1000) + "k" : String(d)),
xTitle: "TARGET INPUT DEPTH (TOKENS)", yTitle: "PP T/S (MEDIAN)",
yMin: Math.max(0, lo - pad), yMax: hi + pad,
v: D.pre.med, band: { low: D.pre.low, high: D.pre.high },
tipHead: i => D.pre.depths[i].toLocaleString() + " target · "
+ fmt(D.pre.tok[i], 0) + " actual tok",
tipBody: i => row(null, "99% high", fmt(D.pre.high[i], 1)) +
row(null, "median", fmt(D.pre.med[i], 1)) +
row(null, "1% low", fmt(D.pre.low[i], 1)) +
row(null, "TTFT p50", fmt(D.pre.t50[i], 0) + " ms")
});
}
</script>
</body>
</html>