Skip to content

GitHub Action

Vizb provides a composite GitHub Action to turn CSV/JSON tabular data or benchmark output (Go, Rust, JavaScript) into interactive HTML visualizations in CI. Add it to any workflow with a single step.

- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- uses: goptics/vizb@v0
with:
cmd: "go test -bench=."
output-html: pages/index.html

Use goptics/vizb@v0 to automatically resolve to the latest v0.x.x release:

- uses: goptics/vizb@v0 # auto-resolves to latest v0.x.x

The action:

  • Resolves the major version tag to the latest patch release
  • Caches the downloaded binary across runs
  • Falls back to the exact tag for non-major refs (e.g., @v0.10.3)
Input Default Description
cmd "" Command whose stdout is visualized (e.g., go test -bench=., cargo bench, or any command emitting benchmark/CSV/JSON output).
file "" Path to an existing input file to visualize — benchmark output, CSV, or JSON (takes priority over cmd).
bench-cmd "" Deprecated: use cmd. Honored only when cmd is empty.
bench-file "" Deprecated: use file. Honored only when file is empty.
name "Comparisons" Dataset/benchmark name (-n flag).
description "" Dataset/benchmark description (-d flag).
tag "" Tag/identifier for the dataset (-t flag).
group "" Column/field names merged into the group name; forwarded as -g (accepts space- or comma-separated, e.g. name category region or name,category/region); parsed by -p/-r.
group-pattern "x" Group pattern (-p flag).
group-regex "" Group regex (-r flag).
sort "" Deprecated: use chart input instead (e.g. chart: 'bar:sort=asc'). Sort order: asc or desc (-s flag).
filter "" Regex to include only matching rows (CSV/JSON: --group label) or benchmark names (-f flag).
mem-unit "B" Memory unit: b, B, KB, MB, GB (-M flag).
time-unit "ns" Time unit: ns, us, ms, s (-T flag).
number-unit "" Number unit: K, M, B, T (-N flag).
select "" csv/json only: select value columns; optional rename with {label} (e.g. price{Unit price},count) (--select flag).
col-axis "" csv/json + group: place numeric column names on this axis (n, x, y, or z) so all columns share one chart (--col-axis / -A flag). Requires group; target axis must not already be used by group-pattern.
json-path "" json only: select a nested array to chart via a jq-like dot path (e.g. .data.results) (--json-path flag).
stat "" Enable stats panel (--stat flag). Empty = disabled; all or true = all categories; otherwise comma-separated from: counts, center, spread, extremes, shape, percentiles, confidence, correlations.
chart "" Per-chart overrides (--chart flag, repeatable). One override per line: <type>:<key>=<val>,.... Keys: swap, sort, scale, labels, 3d-rotate, 3d. E.g. bar:scale=log or pie:labels. Blank lines and #-prefixed lines are ignored.
charts "bar,line,pie" Chart types to generate (-c flag): bar, line, scatter, pie, heatmap, radar.
parser "auto" Parser to use: csv, json, go, js:tinybench, js:vitest, rs:criterion, rs:divan (-P flag).
show-labels "false" Deprecated: use chart input instead (e.g. chart: 'pie:labels'). Show labels on charts (-l flag).
enable-3d "false" Bundle the 3D renderer for vizb ui (--3d flag, mainly useful with data-url when remote data shape is unknown at build time).
merge-files "" Space-separated JSON files to merge.
merge-dir "" Directory to scan for JSON files to merge.
tag-axis "n" Tag injection axis: n, x, y, or z (-A flag).
output-json "" Path for JSON output file. Empty = skip JSON.
output-html "" Path for HTML output file. Empty = skip HTML.
data-url "" URL to fetch vizb JSON from at runtime (-U flag). Accepts a full dataset, a full dataset array, or an automatically detected lazy [{id,name}] catalog. When set, no input file is needed.
vizb-binary "" Path to a pre-built vizb binary on the runner. When set, skips release download/cache and installs this binary instead — useful for testing local builds or unreleased changes.
Output Description
output-file-html Path to the generated HTML file
output-file-json Path to the generated JSON file (same as output-json input)

The action resolves input in this priority order:

  1. file — if provided, uses the existing file directly
  2. cmd — runs the command and captures output
  3. Merge-only — if only merge-files or merge-dir is provided, skips benchmarking
  4. data-url — if only data-url is provided, skips input/merge and fetches data at runtime
- uses: goptics/vizb@v0
with:
cmd: "go test -bench=."
output-html: pages/index.html
- uses: goptics/vizb@v0
with:
file: bench-results.txt
output-html: report.html
- uses: goptics/vizb@v0
with:
data-url: https://example.com/bench.json
output-html: pages/index.html

The base data-url may return one complete dataset, an array of complete datasets, or a lazy catalog such as:

[
{ "id": "linux-amd64", "name": "Linux amd64" },
{ "id": "linux/arm64", "name": "Linux arm64" }
]

Catalog IDs must be non-empty and unique, and catalog entries must omit data and settings. When an entry is selected, the dashboard requests one complete dataset from <data-url>/dataset/<encoded-id>. The detail may omit its id; an included ID must match the catalog ID. Base query parameters are preserved for detail requests. The base and detail endpoints must both satisfy the existing CORS requirement (normally Access-Control-Allow-Origin: * for a file:// dashboard). Details are cached only in memory for the current page session, and failed requests expose a Retry action.

- uses: goptics/vizb@v0
with:
cmd: "go test -bench=."
merge-dir: previous-results/
tag: v1.2.0
tag-axis: x
output-json: merged.json
output-html: pages/index.html
- uses: goptics/vizb@v0
with:
file: sales.csv
select: "price{Unit price},count"
output-html: pages/sales.html
- uses: goptics/vizb@v0
with:
file: api-dump.json
json-path: ".data.results"
output-html: pages/results.html

Use the chart input (one override per line) to configure individual charts without CLI flags:

- uses: goptics/vizb@v0
with:
cmd: "go test -bench=."
charts: "bar,pie,scatter"
chart: |
bar:scale=log,sort=desc
pie:labels
scatter:3d
output-html: pages/index.html

Available override keys: swap, sort, scale, labels, 3d-rotate, 3d.

Enable the stats panel with the stat input:

- uses: goptics/vizb@v0
with:
cmd: "go test -bench=."
stat: "center,spread,percentiles"
output-html: pages/index.html

Set stat: all (or stat: true) to enable every stats category.

Bundle the 3D renderer (mainly useful with data-url):

- uses: goptics/vizb@v0
with:
data-url: https://example.com/bench.json
enable-3d: true
output-html: pages/index.html

Use vizb-binary to test unreleased changes without publishing a release. Build the binary, place it on the runner, and point the action at it:

- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Build vizb
run: go build -o ./bin/vizb .
- uses: ./
with:
cmd: "go test -bench=."
vizb-binary: ./bin/vizb
output-html: pages/index.html

When vizb-binary is set, the action skips version resolution, caching, and the release download — it just installs the binary you provide.