vizb
The root command (vizb) is the primary entry point. It parses benchmark output from multiple frameworks and generates interactive visualizations.
vizb [target] [flags]Input Methods
Section titled “Input Methods”vizb bench.txt -o output.htmlPass a file path as the first argument.
go test -bench . | vizb -o output.htmlPipe benchmark output directly to vizb.
# JSON bench events are auto-detected and converted for Gogo test -bench . -json | vizb -o output.htmlVizb automatically detects go test -bench -json format when using --parser go.
Multi-Language Parsers
Section titled “Multi-Language Parsers”Vizb supports Rust, JavaScript, and TypeScript benchmark frameworks in addition to Go. Use --parser to select the right one:
# Rust Criterioncargo bench | vizb --parser rs:criterion -o output.html
# Rust Divancargo bench | vizb --parser rs:divan -o output.html
# Vitestnpx vitest bench | vizb --parser js:vitest -o output.html
# Tinybenchnode bench.js | vizb --parser js:tinybench -o output.htmlSee the Parser Guide for full details on each parser’s metrics and configuration.
| Flag | Short | Default | Description |
|---|---|---|---|
--output | -o | (stdout) | Output file path. .json → JSON, else → HTML |
--parser | -P | go | Benchmark parser: go, js:tinybench, js:vitest, rs:criterion, rs:divan |
--name | -n | Benchmarks | Benchmark name |
--description | -d | "" | Benchmark description |
--tag | -t | "" | Tag identifier for release tracking |
--group-pattern | -p | x | Pattern-based grouping (n/x/y with / or _) |
--group-regex | -r | "" | Regex-based grouping (named captures) |
--scale | -S | linear | Scale type: linear or log |
--sort | -s | "" | Sort order: asc or desc (default: as-is) |
--charts | -c | bar,line,pie | Chart types to generate |
--show-labels | -l | false | Show value labels on charts |
--filter | -f | "" | Regex to include only matching benchmark names |
--mem-unit | -M | B | Memory unit: b, B, KB, MB, GB |
--time-unit | -T | ns | Time unit: ns, us, ms, s |
--number-unit | -N | "" | Number unit: K, M, B, T (default: as-is) |
Examples
Section titled “Examples”Basic usage
Section titled “Basic usage”# Pipe benchmarks to HTMLgo test -bench . | vizb -o output.html
# From a filevizb bench.txt -o output.htmlJSON output
Section titled “JSON output”# Generate JSON for later mergingvizb bench.txt -o data.json
# Then generate HTML from JSONvizb data.json -o output.htmlGrouping
Section titled “Grouping”# Pattern grouping (slash-separated 3D data)vizb bench.txt -p n/x/y -o output.html
# Regex groupingvizb bench.txt -r '(?<n>.*)/text=(?<x>.*)/level=(?<y>.*)' -o output.htmlSee the Grouping Guide for detailed examples.
Logarithmic scale
Section titled “Logarithmic scale”vizb bench.txt --scale log -o output.htmlFiltering
Section titled “Filtering”# Include only benchmarks matching a patternvizb bench.txt -f "Sort" -o output.htmlTagging for release tracking
Section titled “Tagging for release tracking”vizb bench.txt -o v1.json --tag v1.0 -n "MyBench"See Merging Guide for tag-based comparison.