# `grokkit profile` ## Priority: 8 of 12 **Description**: Run Go benchmarks/pprof, get AI-suggested performance optimizations. **Benefits**: - Tune CLI hotspots (e.g., API streaming, git subprocesses). - Proactive perf improvements without manual profiling. **High-level implementation**: - `go test -bench=. -cpuprofile=prof.out ./cmd`. - Parse pprof data (stdlib `pprof` or text), prompt Grok: "Optimize these hotspots." - Suggest edits via `agent` or `edit --preview`. **CLI example**: ``` grokkit profile ./cmd/agent.go # Outputs: hotspots, suggestions, optional auto-fixes ```