Quickstart¶
This guide gets you from an installed prof binary to a tagged collect in about 10 minutes, using either menus or flags.
Before you begin¶
- Go 1.24.3 or newer (Install Prof lists full prerequisites).
- Module root: your shell cwd is the directory that contains
go.mod. - Benchmarks: you have at least one benchmark in
*_test.go(replaceBenchmarkExamplebelow with a real name from your module). - Terminal:
prof uineeds a normal TTY; for non-interactive shells, use the flag flow below.
What is a tag?¶
A tag is a short label for one profiling run. Prof writes all artifacts for that run under .prof/<tag>/.
Path A: menus (default)¶
Step 1: start the UI¶
Step 2: collect¶
In the menu, choose Collect Profiles, pick your benchmarks and profile types, and enter a tag such as baseline.
Verify: you should see .prof/baseline/ with profiles/, measurements/, and hotspots/ populated.
If the UI does not start, your environment may not expose a TTY. Use Path B or see Troubleshooting.
Path B: flags (CI or scripts)¶
prof auto --benchmarks "BenchmarkExample" --profiles "cpu,memory,mutex,block" --count 10 --tag "baseline"
Verify:
- On disk:
.prof/baseline/containsprofiles/BenchmarkExample/,measurements/BenchmarkExample/, andhotspots/BenchmarkExample/.
If something fails¶
See Troubleshooting (wrong cwd, missing tags, Graphviz).
Next steps¶
- Configure collection for per-function extracts.
- CLI reference for every flag and default.