ANN: hp2html, a tool for viewing GHC heap-profiles

Hello, I am happy to announce the availability of a little tool that I wrote while I was doing some Haskell profiling. It converts GHC's heap-profiles into HTML, and renders them nicely using the flot library. Its functionality is similar to `hp2ps`. I wrote it because I find the HTML output easier to work with and, also, because it can cope with partial profiles, so one can refresh the profile while the program is running. The tool is a very short Haskell program, so it should be quite easy to modify and improve (and there is a lot that can be improved in it! :-). You can use the tool like this: hp2html my_profile.hp This will generate a self-contained HTML file called `my_profile.html`. I am attaching some screen-shots so that you can get an idea of what it looks like. In the generated HTML, hovering over data points shows their labels in the top-right corner. You can zoom into a region by selecting it. To go back to the zoomed-out view, double-click anywhere on the picture. Note that, by default, the tool does not stack data points on top-of each other like `hp2ps`. This makes it easier to see the individual values for the different entries, but it makes it harder to see the total amount for the program. To get the stacked view, use the radio button in the top left corner. `hp2html` is available on Hackage: http://hackage.haskell.org/package/hp2html-0.1 If you are interesting in improving the tool (please do!), the source repo is here: git clone git://github.com/yav/hp2html.git I hope that you find it useful, -Iavor

Hi Iavor,
On Mon, Feb 20, 2012 at 6:45 PM, Iavor Diatchki
Hello,
I am happy to announce the availability of a little tool that I wrote while I was doing some Haskell profiling. It converts GHC's heap-profiles into HTML, and renders them nicely using the flot library. Its functionality is similar to `hp2ps`. I wrote it because I find the HTML output easier to work with and, also, because it can cope with partial profiles, so one can refresh the profile while the program is running. The tool is a very short Haskell program, so it should be quite easy to modify and improve (and there is a lot that can be improved in it! :-).
Looks really nice. The hovering behavior is nice, but I'd like to see the legend as well. It makes it quicker when you want to get a quick overview of what types there are, as the eye can travel back-and-forth between the graph and the legend. -- Johan

Hello,
On Mon, Feb 20, 2012 at 7:03 PM, Johan Tibell
Looks really nice.
Thanks!
The hovering behavior is nice, but I'd like to see the legend as well. It makes it quicker when you want to get a quick overview of what types there are, as the eye can travel back-and-forth between the graph and the legend.
I started with the legend but it was too big on the program that i was profiling, so i switched to the hovering mode. I agree that it is not optimal. Perhaps there's a way to instruct flot to show only some of the entries or, better, order them in some useful way. I'm no flot expert, so ideas (or patches) on how to do it would be most appreciated! -Iavor

On Mon, Feb 20, 2012 at 9:23 PM, Iavor Diatchki
I started with the legend but it was too big on the program that i was profiling, so i switched to the hovering mode. I agree that it is not optimal. Perhaps there's a way to instruct flot to show only some of the entries or, better, order them in some useful way. I'm no flot expert, so ideas (or patches) on how to do it would be most appreciated!
Big in what sense? Area wise? You could perhaps put it outside the flot graph. -- Johan

Hello,
I made a new version of `hp2html` (0.2), which shows the legend by default
(take a look at at the attached screen shot). If the legend is in the way,
you can turn it off (and on) by clicking on the button at the top of the
screen.
Happy profiling,
-Iavor
On Mon, Feb 20, 2012 at 9:42 PM, Johan Tibell
On Mon, Feb 20, 2012 at 9:23 PM, Iavor Diatchki
wrote: I started with the legend but it was too big on the program that i was profiling, so i switched to the hovering mode.
Big in what sense? Area wise? You could perhaps put it outside the flot graph.

On Tue, Feb 21, 2012 at 7:36 PM, Iavor Diatchki
Hello,
I made a new version of `hp2html` (0.2), which shows the legend by default (take a look at at the attached screen shot). If the legend is in the way, you can turn it off (and on) by clicking on the button at the top of the screen.
Nice! -- Johan
participants (2)
-
Iavor Diatchki
-
Johan Tibell