Search
Clear search
Close search
Main menu
Google apps
Groups
Sign in
Groups
golang-nuts
Conversations
About
Send feedback
Help
Custom ServeMux and pprof
48 views
Skip to first unread message
st ov
unread,
Aug 28, 2017, 3:31:12 PM
8/28/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
How do you add pprof to a custom ServeMux?
https://golang.org/pkg/net/http/#ServeMux
Its my understanding that the following import only adds handlers to the default mux.
import
_
"net/http/pprof"
Konstantin Khomoutov
unread,
Aug 28, 2017, 4:57:03 PM
8/28/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to st ov, golang-nuts
https://blog.cloudflare.com/exposing-go-on-the-internet/#servemux
Dave Cheney
unread,
Aug 28, 2017, 6:08:49 PM
8/28/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Copy lines 72-76 into your project.
https://golang.org/src/net/http/pprof/pprof.go#L72
Reply all
Reply to author
Forward
0 new messages