austin entrepreneur

Announcing Clientperf: Simple Client-Side Rails Performance

Posted in Uncategorized by Eric Falcão on June 21, 2008

I’m giving a talk at Austin on Rails next Tuesday on applying the 14 rules of high-performance websites in the typical rails mongrel/nginx stack, the main idea being to focus on some of the important implementation details when it comes to client-side performance optimization.

As I was planning, I realized that there was no simple as in the we’re-all-spoiled-with-rails simple way to measure client download times in production. Now, there is clientperf. It’s just a start, but decent enough to benchmark the actual client performance impact of any optimizations you make:

How it works

It injects javascript into the page that takes a timestamp at the top of the page and at the bottom of the page. Once the browser is done downloading, evaluating and rendering all assets, clientperf makes one last image request to your server with the start time, end time and the URL. Piece of cake.

How to install

gem install clientperf
clientperf /path/to/rails/app
rake db:migrate

and that’s it!

Source

http://github.com/efalcao/clientperf

Thanks

Thanks to Howard Rauscher for the javascript. Thanks to FiveRuns dev team for helping me learn neat things.

Enjoy and please let me know about bugs.