(2011-08-17_10

I've released TKYProf, a web-based interactive visualizer for GHC time and allocation profiling reports. It helps you find the bottlenecks in your code quickly.

Its features are below:

  • A web-based tool based on Yesod, which means there are no dependencies on any GUI toolkits.
  • Interacitve, pretty charts using d3.js.

Prerequisites

TKYProf uses some of HTML5 features, but does not support graceful degradation. So you need a modern browser supporting HTML5 and CSS3.

How to use TKYProf

  1. cabal install tkyprof
  2. Run `tkyprof' on your terminal.
  3. Access http://localhost:3000/.
  4. Drag and drop your profiling reports. TKYProf also supports an ordinary file selection dialog.
  5. TKYProf redirects you to a pretty chart.
  6. To upload more reports, return back to the Home using breadcrumbs on the header.

How to read a chart

(2011-08-16_19
TKYProf draws a chart of the time profiling report by default. If you click the "Alloc profiling" button, the chart changes to the alloc profiling mode smoothly.

Each of the arcs follows these rules:

  • A radial position of the arc expresses a depth of the cost center in a call graph. As a result the deeper node in the call graph is located in the outer place on the chart.
  • A degree of the arc expresses an inherited (accumulative) cost of the cost center.
  • An individual (own) cost of the branch is appended into the child nodes. The node is the same color as the parent node is.

You are almost done. All you have to do is find the biggest arc, which is located as outer as possible. It's the bottleneck.

Get involved

TKYProf is released under BSD3 License. I'm happy to recieve bug reports, patches, and other improvements. Please report bugs via the GitHub Issues.

Happy profiling!