Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call functions to enable block/mutex pprof profiles. #3564

Conversation

timoreimann
Copy link
Contributor

What does this PR do?

Call runtime.SetBlockProfileRate and runtime.SetMutexProfileFraction when debug mode is enabled.

Motivation

According to the documentation, these functions must be called for block and mutex pprof profiles to be generated actually.

@timoreimann timoreimann force-pushed the call-runtime-functions-enabling-block-mutex-pprof-profiles branch from bf97951 to 78df9ff Compare July 5, 2018 23:53
@timoreimann
Copy link
Contributor Author

Kudos to @marco-jantke for clarifying the need.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

According to the documentation[1], specific functions must be called for
block and mutex pprof profiles to be generated actually. This change
does so in case the debug mode is enabled.

[1]https://golang.org/pkg/net/http/pprof/
@traefiker traefiker force-pushed the call-runtime-functions-enabling-block-mutex-pprof-profiles branch from 78df9ff to 084b69f Compare July 6, 2018 08:34
@traefiker traefiker merged commit 0c0ecc1 into traefik:master Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement a new or improved feature. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants