PureYAMLStreaming/WasmSite/index.html
Mihaela Mihaljevic 23d4c77cf4 feat: show live benchmark run log
Add a scrollable browser log so long YAML benchmark runs expose each fetch, WASI, parse, and render step while they execute.
2026-06-06 23:32:21 +02:00

69 lines
2.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PureYAMLStreaming WASM Benchmark</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<main>
<section class="card">
<p class="eyebrow">PureYAMLStreaming</p>
<h1>Live WASM YAML Benchmark</h1>
<p>
Pick a public real-world YAML file. The browser fetches it, feeds the
bytes to the Swift WASI executable through stdin, and reports
Swift-measured document parse timing live.
</p>
<label for="sampleSelect">Public YAML example</label>
<select id="sampleSelect"></select>
<label for="urlInput">URL</label>
<input id="urlInput" type="url" autocomplete="off" />
<button id="runButton" type="button">Run Benchmark</button>
<div id="status" class="status idle">Idle</div>
</section>
<section class="card">
<h2>Timing</h2>
<dl class="metrics">
<div>
<dt>Bytes</dt>
<dd id="bytesMetric">-</dd>
</div>
<div>
<dt>Fetch</dt>
<dd id="fetchMetric">-</dd>
</div>
<div>
<dt>Swift parse</dt>
<dd id="parseMetric">-</dd>
</div>
<div>
<dt>Throughput</dt>
<dd id="throughputMetric">-</dd>
</div>
<div>
<dt>Documents</dt>
<dd id="documentsMetric">-</dd>
</div>
</dl>
</section>
<section class="card">
<h2>Run Log</h2>
<div id="runLog" class="run-log" role="log" aria-live="polite">
<div class="log-entry muted">Waiting for benchmark run.</div>
</div>
</section>
<section class="card">
<h2>Output</h2>
<pre id="output">Pick a YAML file and click "Run Benchmark".</pre>
</section>
</main>
<script type="module" src="./main.js"></script>
</body>
</html>