-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/pprof: redundant TMPDIRs #16178
Comments
I believe the idea behind $HOME/pprof was to save profiles for future reference. If everything written there is being deleted by pprof when it exits, that kind of defeats the point and I agree that either we should just not use that directory or else we should not delete those profiles from it. /cc @rauls5382 |
Yes, the idea behind $HOME/pprof is to save profiles retrieved over http and save them for future reference. pprof does not delete them so that you can examine them in the future. The other temp directory is used to store actual temporary files, for example to communicate with dot or other tools. This directory is cleaned up when pprof exits. I think this is working as intended. |
If that's the case, I would argue that $HOME/pprof only be generated when pprof is invoked when retrieving the profile over HTTP, rather than in all uses of pprof. In other words, only create $HOME/pprof when you about to use it. |
I agree. I'll clean this up on the upstream pprof. |
I have fixed this upstream: google/pprof#45 |
Using
go1.7beta2
The pprof tool has at least two TMPDIRs:
pprof
is used locally, it keeps generating empty pprof directories in a user $HOME directory and never cleans them up.Why have two different variations of TMPDIRs? Why doesn't pprof clean itself up?
The text was updated successfully, but these errors were encountered: