Skip to content

Prof

Prof is a command-line tool for Go that runs benchmarks with go test, captures CPU, memory, mutex, and block profiles, and stores everything under a predictable .prof/<tag>/ tree for analysis with pprof and your own tooling.

Use it when you want comparable profiles across experiments and a stable on-disk layout without memorizing go test and pprof flags.

What you can do

Goal Start here
Install the prof binary Install Prof
First collect in a few minutes Quickstart
Understand cwd, go.mod, and bench/ Working directory and paths
Script or CI: collect without menus Collect profiling data
Per-function extracts in JSON Configure collection
Menus: full UI or terminal flows Interactive UI and TUI
Flags, defaults, and formats in one place CLI reference
Something failed (TTY, paths) Troubleshooting

How the workflow fits together

flowchart LR collect[Collect_prof_auto_or_ui] bench[".prof/tag_layout"] analyze[pprof_or_your_tools] collect --> bench bench --> analyze

You label each run with a tag. Prof writes .prof/<tag>/ with binary profiles, text summaries, and optional per-function extracts.

Terminology

Term Meaning
Module root Directory containing your go.mod; run Prof from here, same as for go test.
Tag Label for one run; artifacts live in .prof/<tag>/.
Profile type One of cpu, memory, mutex, block.

Source

Prof on GitHub.

Next steps