Prof automates Go performance profiling by collecting all pprof data in one command and enabling easy performance comparisons between benchmark runs.
π Documentation |
The project is actively looking for contributors !!
Before Prof: Profiling a single benchmark with multiple profile types requires dozens of manual commands:
# Run benchmark
go test -bench=BenchmarkName -cpuprofile=cpu.out -memprofile=memory.out ...
# Generate reports for each profile type
go tool pprof -cum -top cpu.out
go tool pprof -cum -top memory.out
# Extract function-level data for each function of interest
go tool pprof -list=Function1 cpu.out > function1.txt
go tool pprof -list=Function2 cpu.out > function2.txt
# ... repeat for every function Γ every profile typeWith Prof: One command collects everything and organizes it automatically.
When you use Prof with AI-powered development tools like Cursor, you get a massive productivity boost:
- 80% faster completion - Prof provides structured, organized profiling data that AI tools can instantly analyze
- Much better optimization suggestions - AI tools can see the complete performance picture across all profile types
- Smarter code recommendations - With detailed function-level profiling data, AI tools can suggest more targeted optimizations
- Faster debugging - AI tools can quickly identify performance bottlenecks using Prof's organized output format
Instead of AI tools struggling with raw pprof files, they get clean, structured data that enables them to provide superior performance insights and code improvements.
Collect CPU, memory, mutex, and block profiles in a single command:
prof auto --benchmarks "BenchmarkName" --profiles "cpu,memory,mutex,block" --count 10 --tag "baseline"Easily compare performance between different versions or optimizations:
prof track auto --base "baseline" --current "optimized" --profile-type "cpu" --bench-name "BenchmarkName"Fail CI/CD pipelines on performance regressions with configurable thresholds:
prof track auto --base "baseline" --current "PR" --profile-type "cpu" --bench-name "BenchmarkName" --fail-on-regression --regression-threshold 5.0Enhanced CI/CD Support: Configure function filtering, and custom thresholds to reduce noise and make CI/CD more reliable. See CI/CD Configuration Guide for details.
All profiling data is automatically organized under bench/<tag>/ directories with clear structure.
Organize profile data by package/module for better analysis and collaboration:
# Group profile data by package when collecting
prof auto --benchmarks "BenchmarkName" --profiles "cpu,memory" --count 5 --tag "baseline" --group-by-package
# Group profile data from existing files
prof manual --tag "external-profiles" --group-by-package cpu.prof memory.profWhen enabled, this creates additional *_grouped.txt files that organize functions by their package/module, making it easier to:
- Identify which packages consume the most resources
- Share package-level performance insights with team members
- Focus optimization efforts on specific modules
Don't want to remember benchmark names or commands? Use the interactive terminal interface:
prof tuiWhat it does:
- π Auto-discovers all
BenchmarkXxxfunctions in your project - π Interactive selection of benchmarks, profiles, count, and tag
- π― No typos - everything is selected from menus
- π Same output as
prof auto- organized underbench/<tag>/
TUI Track Mode: Compare existing benchmark data interactively:
prof tui trackgo install github.com/AlexsanderHamir/prof/cmd/prof@latest- Collect profiling data:
prof auto --benchmarks "BenchmarkName" --profiles "cpu,memory,mutex,block" --count 10 --tag "baseline"
prof auto --benchmarks "BenchmarkName" --profiles "cpu,memory,mutex,block" --count 10 --tag "optimized"- Compare performance:
prof track auto --base "baseline" --current "optimized" --profile-type "cpu" --bench-name "BenchmarkName" --output-format "summary"- π Full Documentation - Complete API reference and guides
- π Contributing Guidelines - How to contribute to Prof
- π Code of Conduct - Community guidelines
- ποΈ Codebase Design - Architecture and design decisions
- Go 1.24.3 or later
- Install graphviz
- A Go module (
go.mod) at the repository root
This project is licensed under the MIT License - see the LICENSE file for details.