Plugins - Browser Profiler

StarAdd to favorites

BrowserProfiler a quick way to do performance testing from within your application. While it's often easy to write automated tests that are wrapped with performance profiling, the test implementation of some of rails is totally different in test mode. Also, you might only do certain things in production mode (like caching!) so performance testing in production is really nice.

Simple usage: http://localhost:3000/some/action?browser_profile!

If you add the browser_profile! param to any URL, it will append the profiling output to the bottom of the html file.

What profiling you ask? Well, it needs ruby-prof, which is an awesome library here: http://ruby-prof.rubyforge.org/

We used the ruby convention of bang (!) parameter to imply its modifies itself, the html body. Walk through your own app while profiling to find issues locally, or even after deployment to your production machines. Dont leave this stuff on in real production, obviously. :)

Advanced Usage: Often in Rails on post operations, you redirect afterwards. So how do you see the profiling output of a post-redirect operation?

http://localhost:3000/some/postredirect?fileprofile!

Add the fileprofile!, and it will output the results to file specified in RAILSROOT/log/profile_out.html .

Hint: If you are testing against a site you've deployed somewhere, use FireBug to modify the DOM before the post or Tamper Data to add to the post parameters, and you can add params at will.

The functionality appears to work fine in Rails 1.1, and 1.2, but the tests fail.. Needs more investigation.

License: Released under the MIT license.

Dependencies: ruby-prof (Last tested with ruby-prof 0.4.1)

gem install ruby-prof

Revolution on Rails

http://revolutiononrails.blogspot.com/2007/01/plugin-release-browser-profiler.html

svn://rubyforge.org/var/svn/browser-prof

Rails' (MIT)

  • Currently 5.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Statistics and Logs

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.
Recruiting software

Have a comment?