Friday, September 24, 2010

Graphing include dependencies

Sometimes it's nice to get a higher level view of what files are including which other files.
This becomes tricky as your projects get larger .. So I wrote a little python script to help me visualise it...
You can find the script here

It takes a list of files to analyse on stdin and produces a dot graph file that you can render using the graphviz tools (I find dot and neato to be the most useful for this task)

Heres an example of what I get when I run it over a filtered subset of one of my projects:
(Original is a PDF so its easy to zoom in to see filenames, but you only get a PNG to protect the innocent)

No comments:

Post a Comment