We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c62444 commit 6da1198Copy full SHA for 6da1198
services/profiling/pprof.go
@@ -6,6 +6,7 @@ import (
6
log "github.com/sirupsen/logrus"
7
"net/http"
8
"net/http/pprof"
9
+ "runtime"
10
)
11
12
func StartProfiling() {
@@ -21,6 +22,10 @@ func StartProfiling() {
21
22
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
23
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
24
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
25
+ mux.HandleFunc("/debug/gc", func(w http.ResponseWriter, r *http.Request) {
26
+ runtime.GC()
27
+ w.WriteHeader(http.StatusNoContent)
28
+ })
29
30
go func() {
31
log.WithFields(log.Fields{
0 commit comments