Skip to content

vizb html

Generate an interactive HTML chart from a vizb benchmark JSON file. This is the second step in the JSON pipeline — useful when you want to generate HTML from previously merged or processed data.

Terminal window
vizb html [file] [flags]

[file] is optional when --data-url is set.

A single JSON file containing a vizb benchmark object or array. This must be JSON generated by vizb -o file.json or vizb merge ... -o file.json.

FlagShortDefaultDescription
--output-o(stdout)Output file path (HTML)
--data-url-U(none)URL to fetch benchmark JSON from at runtime (no input file needed)
Terminal window
# Step 1: Convert benchmark to JSON
vizb bench.txt -o data.json
# Step 2: Generate HTML from JSON
vizb html data.json -o report.html
Terminal window
# Merge multiple JSON files
vizb merge v1.json v2.json -o merged.json
# Render the merged result as HTML
vizb html merged.json -o report.html

The default embed mode inlines the benchmark JSON directly into the HTML file. For small datasets this is ideal — one file, works offline, no dependencies. But as benchmark history grows (many merged runs, many benchmarks), the JSON can exceed 1 MB and the output file becomes unwieldy to share or store.

Use --data-url to decouple the UI layer from the data layer: the HTML stays a fixed ~786 KB dashboard shell and fetches the JSON from a URL at load time. The JSON file is hosted separately and can be updated without regenerating the HTML.

Instead of embedding the JSON inside the HTML, point the dashboard at a hosted URL. The generated HTML is a lean ~786 KB viewer; benchmark data is fetched at load time.

Terminal window
vizb html --data-url https://example.com/bench.json -o report.html

Upload bench.json to the URL separately (GitHub raw, S3, GitHub Pages, etc.), then open report.html in any browser.