Using Federicos timeline tool with Mono

While figuring out why Tomboy takes quite a lot of time to start (BGO #567989, hint: it’s not the lack of SQLite), I was reminded of Lord Kelvins old saying: “To measure is to know”.

Thinking how to quantify this, it occured to me that the GNOME community has the perfect tool for figuring out slowness: Federicos awesome timeline tool. All I had to do is figure out how to use this with Mono, which is very easy, as you will see below.

Tomboy startup (click for a full size graph)

Federico uses a nice trick using syscalls, which are logged using strace. Fortunately, this is very easy to reproduce with C#.

That’s all there is to it. The attentive reader will notice that I used the tracing format a bit differently, rather than printing the program name, I use a group parameter. This makes the graph easier to interpret: if you add too many tracing statements, it might be hard to see where the big gaps are. Hijacking the color coding avoids this interpretation difficulty.