enable profiling
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m53s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m53s
This commit is contained in:
7
main.go
7
main.go
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
@@ -196,6 +197,12 @@ func main() {
|
|||||||
// syncedPool.AddRemote(r.PathValue("host"))
|
// syncedPool.AddRemote(r.PathValue("host"))
|
||||||
// })
|
// })
|
||||||
// mux.HandleFunc("GET /save", app.HandleSave)
|
// mux.HandleFunc("GET /save", app.HandleSave)
|
||||||
|
|
||||||
|
mux.HandleFunc("/debug/pprof/", pprof.Index)
|
||||||
|
mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
|
||||||
|
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
||||||
|
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
||||||
|
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
||||||
mux.Handle("/metrics", promhttp.Handler())
|
mux.Handle("/metrics", promhttp.Handler())
|
||||||
|
|
||||||
sigs := make(chan os.Signal, 1)
|
sigs := make(chan os.Signal, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user