jiffyclub / snakeviz

An in-browser Python profile viewer
https://jiffyclub.github.io/snakeviz/
Other
2.36k stars 139 forks source link

Option to write output to html file #183

Open oddbookworm opened 1 year ago

oddbookworm commented 1 year ago

One common use-case that I come across for snakeviz is when someone new to the pygame library has performance issues. I direct them to use cProfile and snakeviz. It would be great to be able to have an html file that can be shared rather than relying on screenshots from the newbie. I tried to implement my own solution by grabbing the localhost version while it was still active using requests.get, but it didn't work properly. As far as I can tell, it requires an actual browser to get the proper content in the html file.

con-f-use commented 1 year ago

Or even a couple of different output formates like:

sankeviz --type sunburst data.cprofile out.svg  # and also working wiht: out.html, out.jpg, out.html