Skip to content

Commit

Permalink
feat: add xhttp profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalvas committed Aug 3, 2023
1 parent d350455 commit 543d169
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xhttp/profiler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xhttp

import (
"net/http"
"net/http/pprof"
)

func AttachProfiler(mux *http.ServeMux) {
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)
}

0 comments on commit 543d169

Please sign in to comment.