Quickstart¶
Assume the module root as cwd and benchmarks in *_test.go. Terms: index.
Use menus (default)¶
Collect with one tag, change code, run again with another tag, then Compare two tagged runs. Narrower flows: Interactive UI and TUI (prof tui, prof tui track).
Use flags (CI or scripts)¶
- Baseline:
prof auto --benchmarks "BenchmarkExample" --profiles "cpu,memory,mutex,block" --count 10 --tag "baseline"
- After changes:
prof auto --benchmarks "BenchmarkExample" --profiles "cpu,memory,mutex,block" --count 10 --tag "candidate"
- Compare:
prof track auto --base "baseline" --current "candidate" --profile-type "cpu" --bench-name "BenchmarkExample" --output-format "summary"
Output¶
- Artifacts:
bench/<tag>/— Collect profiling data. - Compare report: stdout (more formats in Compare runs).