Skip to content

vizb

The root command (vizb) is the primary entry point. It parses benchmark output from multiple frameworks and generates interactive visualizations.

Terminal window
vizb [target] [flags]
Terminal window
vizb bench.txt -o output.html

Pass a file path as the first argument.

Vizb supports Rust, JavaScript, and TypeScript benchmark frameworks in addition to Go. Use --parser to select the right one:

Terminal window
# Rust Criterion
cargo bench | vizb --parser rs:criterion -o output.html
# Rust Divan
cargo bench | vizb --parser rs:divan -o output.html
# Vitest
npx vitest bench | vizb --parser js:vitest -o output.html
# Tinybench
node bench.js | vizb --parser js:tinybench -o output.html

See the Parser Guide for full details on each parser’s metrics and configuration.

FlagShortDefaultDescription
--output-o(stdout)Output file path. .json → JSON, else → HTML
--parser-PgoBenchmark parser: go, js:tinybench, js:vitest, rs:criterion, rs:divan
--name-nBenchmarksBenchmark name
--description-d""Benchmark description
--tag-t""Tag identifier for release tracking
--group-pattern-pxPattern-based grouping (n/x/y with / or _)
--group-regex-r""Regex-based grouping (named captures)
--scale-SlinearScale type: linear or log
--sort-s""Sort order: asc or desc (default: as-is)
--charts-cbar,line,pieChart types to generate
--show-labels-lfalseShow value labels on charts
--filter-f""Regex to include only matching benchmark names
--mem-unit-MBMemory unit: b, B, KB, MB, GB
--time-unit-TnsTime unit: ns, us, ms, s
--number-unit-N""Number unit: K, M, B, T (default: as-is)
Terminal window
# Pipe benchmarks to HTML
go test -bench . | vizb -o output.html
# From a file
vizb bench.txt -o output.html
Terminal window
# Generate JSON for later merging
vizb bench.txt -o data.json
# Then generate HTML from JSON
vizb data.json -o output.html
Terminal window
# Pattern grouping (slash-separated 3D data)
vizb bench.txt -p n/x/y -o output.html
# Regex grouping
vizb bench.txt -r '(?<n>.*)/text=(?<x>.*)/level=(?<y>.*)' -o output.html

See the Grouping Guide for detailed examples.

Terminal window
vizb bench.txt --scale log -o output.html
Terminal window
# Include only benchmarks matching a pattern
vizb bench.txt -f "Sort" -o output.html
Terminal window
vizb bench.txt -o v1.json --tag v1.0 -n "MyBench"

See Merging Guide for tag-based comparison.