My favorite development tools are the snoopy kind. I love tools like tcpdump(1) and FireBug that let me look at what’s going on inside the software I’m developing. Its fun to just watch the mechanisms work. Further, they can really save your bacon if your expectations of how something should work diverge from reality.
We’ve always had great tools for this in Ruby. Of course there’s the development log, which is chock full of interesting information. There are great open source tools like pl_analyze that parse that information and give you interesting on what is going on.
However, I haven’t found tools that give me two things:
- The ability to understanding a request in its entirety. Rails dumps a lot of great info in the development log. Out of the box you’ve got queries generated by ActiveRecord, information on the request parameters, template render timings and other useful nuggets. However, trying to figure out exactly what models, filters and templates are involved in rendering a request can prove trying.
- Performance peripheral vision. As I’m developing an application, I’d love to see information on how I’m spending my time in each request. Finding places where a model needs some performance attention or a view is taking a long time to render before they slow down my production servers would make my life much shinier.
Luckily for all of us, we’ve just released a tool for doing both of these things1. Its callled TuneUp and we think its pretty damn cool.
What is FiveRuns TuneUp?
TuneUp consists of two components; a developer panel plugin that you install in your applications for use in development, and the hosted TuneUp service where you can upload information about your app’s performance and share it with others.
The plugin adds a panel to the top of your application that displays information about how long it takes to execute an action, exactly what happened while it was executing, and how this compares with previous requests with the same URI. The information includes the filters that were called, model activity that occurred, and views that were rendered. You can see in-depth information about your database schema, SQL queries, and if you’re using MySQL (right now), EXPLAIN information on those queries. Everything’s contextual, so you can drill down and see exactly where things are happening… and even jump to the related line of code in TextMate.
How/Why would you use the TuneUp panel?
There are two core uses for the TuneUp panel. The first is simply as a casual source of information as you develop you application. It’s a handy tool to have around to tell you what’s happening in your action, and as a quick reference for schema information. It’s also a compelling way to incrementally improve performance, with basic metrics available at all times to prevent gradual response time creep, helping you see performance bottlenecks early. Premature optimization is the devil, but that doesn’t mean it makes sense to hide your head in the sand and stay ignorant of problems you’ll need to solve around the corner.
How about the service?
Sometimes you run into issues you don’t know how to resolve by yourself, or have information about the performance or makeup on an action that you’d like to share with others. The TuneUp panel includes an easy upload facility that lets you send the information on an action to http://tuneup.fiveruns.com, where you can make it public (or just send a quick link to someone).
Maybe you have a lot of Rails experience that could benefit others in the community. With more call stack and performance context to work from, it’s even easier for you to contribute your know-how to help other people solve problems. TuneUp is meant as a to be a service to the community, so get involved!
How do I get it and install it?
sudo gem install fiveruns_tuneup
fiveruns_tuneup /path/to/application
cd /path/to/application
ruby script/server
For more information, see the help documentation.
It’s Open Source
We’d love your help in making TuneUp better. You can find us up at at GitHub (with TuneUp’s repo right here).
Fork away. Send pull requests often!
1 I’ll pretend this surprised you















Continued Discussion
No comments have been added yet.