-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable profiling over HTTP in debug mode #1492
Conversation
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
LGTM |
LGTM. |
Cool! I've never seen this before. Why no |
@MHBauer What do you mean? |
@aluzzardi maybe I am looking in the wrong place, but I see one more function called Trace, here. Again, I know very little about this whole profiling thing in the first place, so maybe there was a reason you left it off. |
r.HandleFunc("/pprof/heap", pprof.Handler("heap").ServeHTTP) | ||
r.HandleFunc("/pprof/goroutine", pprof.Handler("goroutine").ServeHTTP) | ||
r.HandleFunc("/pprof/threadcreate", pprof.Handler("threadcreate").ServeHTTP) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r.HandleFunc("/debug/pprof/trace", pprof.Trace)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly this. I probably should have done this by example like you did. If there is a reason to not expose it, that's fine. Don't let me hold up the merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's new in go 1.5.x, I added a commit to the PR
Signed-off-by: Victor Vieux <vieux@docker.com>
LGTM |
Enable profiling over HTTP in debug mode
Enable profiling over HTTP in debug mode
Signed-off-by: Andrea Luzzardi aluzzardi@gmail.com