Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Profiler for Rails using ruby-prof

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 browser-prof.gemspec
Octocat-spinner-32 init.rb
README.rdoc

Browser-prof

This is a simple tool to profile single web requests in Rails using the power or ruby-prof. This gem is a based on the discontinued Browser Profiler (rubyforge.org/projects/browser-prof).

  • Easy walking through complex changes

  • Low overhead in development mode

  • MIT licensed

  • Tested with Rails 2.3.2 & 2.3.10

Installation & basic usage

You can run browser-prof either as a plugin or through rubygems. For plugin:

$ ./script/plugin install http://github.com/barttenbrinke/browser-prof.git

For rubygems, add the following lines to your Bundle file:

gem 'browser-prof'

Add a require 'browser-prof' to your environment.rb

Profiling

Add ruby-prof to your Gemfile, run bundle install and start op your server environment. To profile, just open any url:

$ http://0.0.0.0:3000/some/action?browser_profile!

On the botton of your page a html ruby-prof trace will be appended. Please note that the action will take lot longer, as it will be passed through ruby-prof.

If you want to profile PDF, Json or post actions, just run the following command:

$ http://0.0.0.0:3000/some/action.js?file_profile!

This will write the results to /log/. You can take a look at this through any browser.

$ open log/profile_out.html

Additional information

Browser-profile was originally designed and built by Aaron Batalion (aaron@hungrymachine.com) and is now maintained by Bart ten Brinke.

Do you have a rails application that is not performing as it should? If you need an expert to analyze your application, feel free to contact either Willem van Bergen (willem@railsdoctors.com) or Bart ten Brinke (bart@railsdoctors.com).

Something went wrong with that request. Please try again.