hp2pretty-0.9 released
hp2pretty is a tool I wrote to graph Haskell heap profiling output, to help see where your program is using memory.
Install with cabal update && cabal install hp2pretty
,
run with hp2pretty --help
(assuming cabal installed it somewhere
in your PATH
- otherwise try ~/.cabal/bin
).
Inspired by an emailed bug report (with patch, my favourite kind, although
I didn't apply it in this case due to some weird issues in Firefox) about
the key being truncated when the +RTS -L option is used for long cost center
names, I worked on making the key and title output more flexible. The
workflow to generate a report with a detached key is via a simple text file,
listing the SVG for the key label box, and the corresponding SCC name. This
format is easy to parse with bash (for example), and I wrote scripts to output
LaTeX for PDF and also simple HTML5. A Makefile build system glues it
together. See the examples/
subfolder of cabal unpack hp2pretty
.
The LaTeX output is made easier by the svg package, which handles the calls to inkscape to convert files automatically. I learnt about it and found a complete example on TeX stackexchange.
You can download the example output report.pdf or browse the example output report.html.