You are viewing resiak

Previous Entry | Next Entry

Bustle: a D-Bus activity charting tool

lens

When working on Telepathy, I've often wanted to be see which D-Bus methods are being called on whom, when signals are emitted, and so on. Timing information is also handy: I'd like to figure out why cold-starting Empathy takes 12 seconds, and it'd be much easier if I could look at a diagram rather than staring at the unreadable output of dbus-monitor.

Previously, Alban wrote a tool that used a patched version of mscgen, and produced appropriate input with a dbus-monitor-like Python script. I wanted some more D-Bus-specific diagrams, and ended up reimplementing both the monitoring component (by forking dbus-monitor, as its --profile output did not contain quite enough information) and the diagram-drawing component (using Cairo). I'm happy to present an initial release of Bustle:

Screenshot of Bustle 0.1

There's a Telepathy-specific hack in the tool to shorten object paths, but it shouldn't make the tool any less useful for looking at other D-Bus traffic.

I haven't made binary packages yet, I'm afraid, so you'll need to grab the source tarball and build it if you want to try it out. In Debian-land, the dependencies are libdbus-1-dev libglib2.0-dev libghc6-mtl-dev libghc6-cairo-dev libghc6-gtk-dev libghc6-parsec-dev; see README in the source tree for how to build and use it.

The astute among you may have noticed from the dependencies that the diagram-building component is implemented in Haskell, using the excellent bindings to Gtk+ and Cairo. I got a prototype going within a few hours, and the strong correctness guarantees that the type system provides meant that I could refactor it mercilessly with confidence. I'm sure that I would have spent many frustrating hours chasing type bugs had I written it in Python, which is a more conventional high-level language for prototyping and writing tools like this. Next time you're frustrated by such bugs, you should give Haskell a try. :-)

Edit: Bustle now lives at willthompson.co.uk/bustle.

Comments

( 4 comments — Leave a comment )
burtonini.com
Feb. 2nd, 2009 02:37 pm (UTC)
How big?!
130 meg for the Haskell runtime?!
resiak
Feb. 3rd, 2009 09:09 am (UTC)
Re: How big?!
If you mean GHC, yeah, it's huge.

It doesn't help that GHC-compiled binaries are statically linked. :(
dgh
Feb. 5th, 2009 07:39 am (UTC)
Re: How big?!
Compiler != runtime.
joelpietersen
Feb. 25th, 2010 03:22 pm (UTC)
Hmm..
That's just a touch over my head.
( 4 comments — Leave a comment )

Latest Month

June 2012
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
Powered by LiveJournal.com
Designed by Tiffany Chow