ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
794 stars 46 forks source link

Idea: graphical output #71

Open ionelmc opened 4 years ago

ionelmc commented 4 years ago

Use graphviz or something to get call graphs instead of text output.

wsdookadr commented 3 years ago

Use graphviz or something to get call graphs instead of text output.

Yes, this would be a really nice feature. I wrote a custom Action here that's capable of building a call graph, and then wrote some code that renders it via graphviz, it's a bit custom for that specific use-case (it only handles call and return events) but I think it could be made more generic. Maybe it can help as a prototype or starting point.

I've worked with large call graphs in other contexts, and I've seen they can get quite big. I think in addition to graphviz, it would be helpful to produce the graphs in other formats too, and to render them with gephi, holoviews . I think I'm still looking for something that allows the navigation of a graph without bringing all of it into the viewport. Holoviews I've seen has some features that allow bundling graphs which might be useful.