joerick/pyinstrument

Add a renderer for pstats files

divyansshhh opened this issue · 3 comments

Would you be open to a PR which renders the pstats file generated using pyinstrument in a Jupyter like environment using gprof2dot?

I suspect this will had a dependency on gprof2dot.

Hi there. I'm not too keen on adding a dependency, what's your reason for wanting gprof2dot? I'm curious because maybe there's a use-case for such a diagram that I'm not seeing.

I find graphical output for certain use cases to be easier to understand and with the current setup, I first generate a pstats file then use gprof2dot to visualize it. This adds an additional step which I wish wasn't there.

it should be easy enough for you to create a function that does that within your notebook, I think it's not worth adding a dependency for that as I think the pyinstrument default outputs are generally more useful for performance work generally. Thanks for the suggestion though!