mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-29 15:43:57 +01:00
7 lines
6.5 KiB
HTML
7 lines
6.5 KiB
HTML
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Node and Go: archive file requests</title><style>
|
||
body{margin:0;background:transparent;color:var(--foreground,#242424);font:14px/1.5 var(--font-sans,system-ui,sans-serif)}h2{font-size:20px;margin:0 0 8px;font-weight:650}p{margin:8px 0;color:var(--muted-foreground,#68717d)}.controls{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}label{display:flex;flex-direction:column;gap:4px;font-size:12px}select{font:inherit;font-size:14px;padding:7px 9px;border:1px solid var(--border,#b8bdc6);border-radius:6px;background:var(--card,#fff);color:inherit}table{border-collapse:collapse;width:100%;table-layout:fixed}th,td{padding:12px 5px;border-bottom:1px solid var(--border,#d0d5dd);text-align:right;vertical-align:top;overflow-wrap:anywhere}th{font-size:12px;font-weight:600;color:var(--muted-foreground,#68717d)}th:first-child,td:first-child{text-align:left;width:35%;padding-left:0}th:last-child,td:last-child{padding-right:0}td{font-variant-numeric:tabular-nums}.failure{color:var(--destructive,#b4413b);font-size:12px}.note{font-size:12px;margin-top:14px}.limit{border-left:3px solid var(--border,#9aa2ad);padding-left:12px;margin-top:18px}footer{font-size:11px;color:var(--muted-foreground,#68717d);margin:16px 0 0}@media(max-width:440px){th,td{padding:10px 3px;font-size:12px}h2{font-size:18px}}
|
||
</style></head><body><h2>Node and Go: archive file requests</h2><p>Real server entrypoints, disposable MongoDB and Redis, synthetic archive originals. Every successful response was checked by SHA-256.</p><div class="controls"><label>Concurrent requests<select id="concurrency"><option value="8">8 warm requests</option><option value="1">1 warm request</option></select></label><label>Metric<select id="metric"><option value="p95Ms">p95 response time</option><option value="requestsPerSecond">Throughput</option><option value="peakProcessTreeRssBytes">Sampled peak RSS</option><option value="cpuMsPerRequest">CPU per request</option></select></label></div><table><thead><tr><th scope="col">Fixture</th><th scope="col">Node</th><th scope="col">Go</th><th scope="col">Go / Node</th></tr></thead><tbody id="rows"></tbody></table><p class="note" id="explanation"></p><p class="limit">Node returned HTTP 500 for the 2 MiB text fixture: its persisted term array could not be cloned into the worker. No speedup is assigned to that failed baseline.</p><p class="note">Three alternating-order rounds; 100 warm requests per batch. CPU includes worker processes and post-response view writes. RSS is sampled every 10 ms and excludes MongoDB, Redis and the load generator. Shared gzip caching, remote providers, S3 and startup are outside this workload.</p><footer>v24.14.1 · go version go1.27.3 linux/amd64 · Intel Xeon E312xx (Sandy Bridge, IBRS update) · 2026-11-02T22:43:06.748Z</footer><script>
|
||
const data=[{"fixture":"64 KiB changed text","node":{"1":{"p95Ms":57.22557300000335,"requestsPerSecond":24.383191248731073,"peakProcessTreeRssBytes":328740864,"cpuMsPerRequest":44.3},"8":{"p95Ms":209.8424640000012,"requestsPerSecond":49.65397527494103,"peakProcessTreeRssBytes":336949248,"cpuMsPerRequest":25.8}},"go":{"1":{"p95Ms":22.262056999999913,"requestsPerSecond":50.991833770513594,"peakProcessTreeRssBytes":90464256,"cpuMsPerRequest":14},"8":{"p95Ms":88.1916429999983,"requestsPerSecond":99.82934034506914,"peakProcessTreeRssBytes":116531200,"cpuMsPerRequest":11.7}}},{"fixture":"2 MiB absent terms","node":{"failure":"DataCloneError: persisted term array cannot be cloned into the anonymization worker"},"go":{"1":{"p95Ms":107.51090200000908,"requestsPerSecond":10.76895500396105,"peakProcessTreeRssBytes":103006208,"cpuMsPerRequest":75.7},"8":{"p95Ms":603.8920930000022,"requestsPerSecond":14.694812908130627,"peakProcessTreeRssBytes":125169664,"cpuMsPerRequest":71.4}}},{"fixture":"128 KiB JS boundary regex","node":{"1":{"p95Ms":146.98564400000032,"requestsPerSecond":9.444328433881818,"peakProcessTreeRssBytes":340422656,"cpuMsPerRequest":111.9},"8":{"p95Ms":952.0332050000143,"requestsPerSecond":12.188947006882518,"peakProcessTreeRssBytes":367558656,"cpuMsPerRequest":89.8}},"go":{"1":{"p95Ms":23.560662999996566,"requestsPerSecond":47.95122033602092,"peakProcessTreeRssBytes":93462528,"cpuMsPerRequest":16},"8":{"p95Ms":104.97017099999357,"requestsPerSecond":80.51529414662845,"peakProcessTreeRssBytes":118611968,"cpuMsPerRequest":14.6}}},{"fixture":"2 MiB binary","node":{"1":{"p95Ms":60.91815000001225,"requestsPerSecond":20.4216536263135,"peakProcessTreeRssBytes":330346496,"cpuMsPerRequest":68.2},"8":{"p95Ms":305.56796299999405,"requestsPerSecond":37.193564099013756,"peakProcessTreeRssBytes":333549568,"cpuMsPerRequest":46.4}},"go":{"1":{"p95Ms":52.13355699999374,"requestsPerSecond":22.493971137738143,"peakProcessTreeRssBytes":85000192,"cpuMsPerRequest":28},"8":{"p95Ms":282.82277800003067,"requestsPerSecond":49.06734105762263,"peakProcessTreeRssBytes":101969920,"cpuMsPerRequest":21.8}}}];const descriptions={p95Ms:'Lower is better. Values are medians of the per-round p95 latencies, not a pooled p95.',requestsPerSecond:'Higher is better. Values are medians of three per-round throughputs.',peakProcessTreeRssBytes:'Lower is better. Median of the sampled per-round process-tree peaks. Short-lived peaks can be missed.',cpuMsPerRequest:'Lower is better. Approximate server process-tree CPU per completed request, then median across rounds.'};
|
||
function render(){const metric=document.querySelector('#metric').value,c=document.querySelector('#concurrency').value,body=document.querySelector('#rows');body.replaceChildren();for(const row of data){const tr=document.createElement('tr');const name=document.createElement('td');name.textContent=row.fixture;tr.append(name);for(const runtime of ['node','go']){const td=document.createElement('td');if(row[runtime].failure){td.textContent='HTTP 500';td.className='failure'}else{let value=row[runtime][c][metric],unit=metric==='requestsPerSecond'?'req/s':'ms';if(metric==='peakProcessTreeRssBytes'){value/=1048576;unit='MiB'}td.textContent=value.toFixed(1)+' '+unit}tr.append(td)}const ratio=document.createElement('td');ratio.textContent=row.node.failure||row.go.failure?'—':(row.go[c][metric]/row.node[c][metric]).toFixed(2)+'×';tr.append(ratio);body.append(tr)}document.querySelector('#explanation').textContent=descriptions[metric]+' The last column divides Go by Node.'}
|
||
document.querySelectorAll('select').forEach(select=>select.addEventListener('change',render));render();console.log('Benchmark rows:',data.length);
|
||
</script></body></html> |