
Blackfire Continuous Profiler
Low-overhead continuous profiling for app performance optimization.
Discover top open-source software, updated regularly with real-world adoption signals.

Unified wall‑clock profiler for Go applications with mixed I/O and CPU
fgprof samples all goroutine stacks to show both On‑CPU and Off‑CPU time, letting Go developers pinpoint bottlenecks in programs that combine computation and I/O.
fgprof is a sampling profiler for Go that captures the full picture of program execution. By periodically invoking runtime.GoroutineProfile, it records the call stacks of every goroutine, regardless of whether the goroutine is currently on‑CPU or blocked on I/O, channels, locks, etc. The collected data can be exported in the standard go tool pprof format or as folded stacks for Brendan Gregg’s FlameGraph utilities, giving developers a single source of truth for wall‑clock performance.
The tool is aimed at Go engineers who need to understand mixed workloads—services that spend significant time waiting on network or disk while also performing CPU‑intensive work. Integration is straightforward: import the package, register fgprof.Handler() on an HTTP mux, and query the /debug/fgprof endpoint with a seconds parameter. The resulting profile can be visualized with go tool pprof or converted to a flame graph for deeper analysis. Overhead is modest for programs with fewer than 1 000 active goroutines, but may become noticeable above 10 k goroutines.
fgprof requires Go 1.19 or newer; older versions can introduce stop‑the‑world pauses in highly concurrent programs. It runs as a background goroutine that wakes ~99 times per second, so it coexists with Go’s built‑in CPU profiler and net/http/pprof without needing to choose between them.
When teams consider fgprof, these hosted platforms usually appear on the same shortlist.
Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.
Identify hidden I/O latency in a web service
Shows that a slow network request dominates wall‑clock time, guiding developers to add caching or retry logic
Validate CPU‑bound optimization
Confirms that a refactored algorithm reduces on‑CPU time without increasing blocking time
Compare mixed workload across releases
Provides comparable flame graphs to track how changes affect both computation and waiting periods
Integrate profiling into CI pipelines
Automates collection of short‑duration profiles to catch regressions before deployment
No. fgprof can run alongside the built‑in profiler, giving you both views simultaneously.
Go 1.19 or newer; older versions may cause significant stop‑the‑world pauses with many goroutines.
By sending an HTTP request to `/debug/fgprof?seconds=N` and then using `go tool pprof` or converting to folded stacks.
As a sampling profiler, it may miss very brief spikes; for deterministic tracing use Go's trace tools.
Impact is modest for typical services (< 1 k goroutines) but grows with goroutine count; evaluate in staging if you have many goroutines.
Project at a glance
StableLast synced 4 days ago