Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Enable profiling over HTTP in debug mode #1492

Merged
merged 3 commits into from
Dec 8, 2015

Conversation

aluzzardi
Copy link
Contributor

Signed-off-by: Andrea Luzzardi aluzzardi@gmail.com

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
@abronan
Copy link
Contributor

abronan commented Dec 3, 2015

LGTM

@dongluochen
Copy link
Contributor

LGTM.

@MHBauer
Copy link
Contributor

MHBauer commented Dec 3, 2015

Cool! I've never seen this before.

Why no Trace?

@aluzzardi
Copy link
Contributor Author

@MHBauer What do you mean?

@MHBauer
Copy link
Contributor

MHBauer commented Dec 4, 2015

@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)
}
Copy link
Contributor

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)

Copy link
Contributor

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.

Copy link
Contributor

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

vieux added 2 commits December 7, 2015 21:59
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
@vieux
Copy link
Contributor

vieux commented Dec 8, 2015

LGTM

vieux added a commit that referenced this pull request Dec 8, 2015
Enable profiling over HTTP in debug mode
@vieux vieux merged commit 4aafe4a into docker-archive:master Dec 8, 2015
@vieux vieux deleted the profiling branch December 8, 2015 20:43
ChristianKniep pushed a commit to ChristianKniep/swarm that referenced this pull request Jul 27, 2017
Enable profiling over HTTP in debug mode
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants