File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ require (
13
13
github.com/aws/aws-sdk-go-v2/service/s3 v1.84.0
14
14
github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee
15
15
github.com/cep21/circuit/v3 v3.2.2
16
+ github.com/felixge/fgprof v0.9.5
16
17
github.com/golang/mock v1.6.0
17
18
github.com/google/uuid v1.6.0
18
19
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1
@@ -61,7 +62,6 @@ require (
61
62
github.com/beorn7/perks v1.0.1 // indirect
62
63
github.com/cespare/xxhash/v2 v2.3.0 // indirect
63
64
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
64
- github.com/felixge/fgprof v0.9.5 // indirect
65
65
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
66
66
github.com/google/pprof v0.0.0-20250422154841-e1f9c1950416 // indirect
67
67
github.com/mitchellh/mapstructure v1.5.0 // indirect
Original file line number Diff line number Diff line change 6
6
"net/http"
7
7
"time"
8
8
9
+ "github.com/felixge/fgprof"
9
10
"github.com/prometheus/client_golang/prometheus/promhttp"
10
11
"go.uber.org/atomic"
11
12
"go.uber.org/zap"
@@ -53,6 +54,9 @@ func initHandler(ready *atomic.Bool) http.Handler {
53
54
mux .HandleFunc ("/live" , liveness )
54
55
mux .HandleFunc ("/ready" , readiness (ready ))
55
56
mux .Handle ("/log/level" , logger .Handler ())
57
+ // fgprof can collect CPU profile even for Off-CPU goroutines.
58
+ // It's useful for measurement for any operations that force goroutines to block.
59
+ mux .Handle ("/debug/fgprof" , fgprof .Handler ())
56
60
57
61
return mux
58
62
}
You can’t perform that action at this time.
0 commit comments