From 90f3365d93448c45bcb646d4449f9af8f3568bb8 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 18 Jun 2022 11:04:52 +0100 Subject: Add fgprof pprof profiler (#20005) fgprof is a sampling Go profiler that allows you to analyze On-CPU as well as Off-CPU (e.g. I/O) time together. Go's builtin sampling CPU profiler can only show On-CPU time, but it's better than fgprof at that. Go also includes tracing profilers that can analyze I/O, but they can't be combined with the CPU profiler. fgprof is designed for analyzing applications with mixed I/O and CPU workloads. This kind of profiling is also known as wall-clock profiling. Whilst fgprof can cause significant STW latencies in applications with a lot of goroutines (> 1-10k), these latencies only occur if the profile is requested - it doesn't cause a delay by simply being available. The fgprof profile is mounted on `http://localhost:6060/debug/fgprof?seconds=3` Signed-off-by: Andrew Thornton --- go.mod | 1 + 1 file changed, 1 insertion(+) (limited to 'go.mod') diff --git a/go.mod b/go.mod index e7cb85ad1b..e06ccfe13d 100644 --- a/go.mod +++ b/go.mod @@ -26,6 +26,7 @@ require ( github.com/editorconfig/editorconfig-core-go/v2 v2.4.4 github.com/emirpasic/gods v1.18.1 github.com/ethantkoenig/rupture v1.0.1 + github.com/felixge/fgprof v0.9.2 github.com/gliderlabs/ssh v0.3.4 github.com/go-chi/chi/v5 v5.0.7 github.com/go-chi/cors v1.2.1 -- cgit v1.2.3