SamSaffron/MiniProfiler — pull request #81 by rtomayko (2012-09-30 07:05:14+00:00)
Title: Custom timing columns

This is an experiment in adding custom timing columns [as discussed here](http://community.miniprofiler.com/permalinks/111/profiling-memcached-redis-rpc-time):

> I’d love to be able to show things like RPC calls + time, redis requests + time, and memcached requests + time. The existing SQL column feels like a perfect template for displaying this information. I imagine additional columns filling in to the right of the SQL one.

This is still really rough to look at but is basically working as imagined:

![](http://github-images.s3.amazonaws.com/skitch/gist_1-20120929-235054.png)

It's a lot harder to read than I pictured in my head but I believe that's mostly due to the distance of the extra columns from their containing timing. I'd like to play with the spacing and maybe some light zebra striping to see if that helps.

I haven't added specs for anything yet and am still mostly just experimenting but would love to get your feedback on the general direction.

Also, slightly off topic, but I'm curious if you've ever played with using the new [ActiveSupport::Notifications APIs](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) to get SQL timings instead of shimming into the various adapters. In the app I'm testing this with, I'm tapping into the AS::Notifications events for all the custom timings and reporting to the `MiniProfiler#counter` API added in this pull request. It feels very clean and organized. Might be worth looking into as I believe most of the timing data you're using here is available.

/cc @josh, @brianmario, @tmm1, @tnm, @kneath, @github/perf