You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output file parameters (for file-based output formats):
-output=f Generate output on file f (stdout by default)
Intuitively, a user would expect a output file to be generated that contains the specified format. However, that is not what always happens. The logic that pprof follows is somewhat convoluted and sometimes it will output the file, sometimes it will still invoke the visualizer, and sometimes it does both, and maybe it does neither in some code paths (it's hard to follow the logic)?
For example, consider the following command:
$ go tool pprof -weblist=. -output=weblist.html foo.test /tmp/cpu.profile
Generating report in weblist.html
One would expect that this outputs the weblist output as the weblist.html file. However, this is not what happens. Running the command invokes the web browser (which fails over SSH). Even worse, it claims to have written the file, when it simply outputs an empty file with nothing in it.
Whether the pprof tools outputs a file should be simple:
If there is an output file specified, always write the output to that file. Otherwise, try to invoke the associated visualizer (svg, chrome, stdout, etc...).
The text was updated successfully, but these errors were encountered:
Using
go1.7beta2
The pprof tools claims:
Intuitively, a user would expect a output file to be generated that contains the specified format. However, that is not what always happens. The logic that pprof follows is somewhat convoluted and sometimes it will output the file, sometimes it will still invoke the visualizer, and sometimes it does both, and maybe it does neither in some code paths (it's hard to follow the logic)?
For example, consider the following command:
One would expect that this outputs the
weblist
output as the weblist.html file. However, this is not what happens. Running the command invokes the web browser (which fails over SSH). Even worse, it claims to have written the file, when it simply outputs an empty file with nothing in it.The current logic follows a non-trivial path that is dependent on whether a visualizer is available, whether a post process function is available, and other non-obvious code paths.
Whether the pprof tools outputs a file should be simple:
The text was updated successfully, but these errors were encountered: