I'd love to be able to export a .dot file from an ObjectGraph that contains a subgraph of a garbage snapshot that contains just a specified source component and its descendants (to a configurable number of generations). With the source component subgraph highlighted in red, of course.
g = refcycle.garbage()
sources = g.source_components()
subgraph = g.subgraph_descendants(sources[0], generations=5)
subgraph.write_to_dot('garbage.dot', highlight_subgraph=sources[0])
I'd love to be able to export a
.dotfile from anObjectGraphthat contains a subgraph of a garbage snapshot that contains just a specified source component and its descendants (to a configurable number of generations). With the source component subgraph highlighted in red, of course.