Skip to content

Commit

Permalink
Added a quick start section to README
Browse files Browse the repository at this point in the history
  • Loading branch information
bhb committed Dec 12, 2011
1 parent 31bc3a0 commit ef28472
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

Middleware for profiling Rack-compatible apps using [perftools.rb](http://github.com/tmm1/perftools.rb)

## Quick start

Assuming your application is using Rails 3 (and you have installed the requirements in the next section), add the following code:

Gemfile:
gem 'rack-perftools_profiler', :require => 'rack/perftools_profiler'

config/environment.rb:

config.middleware.use ::Rack::PerftoolsProfiler, :default_printer => 'gif', :bundler => true

The visit the page you want to profile:

http://localhost:3000/some_action?profile=true

## Requirements

You'll need graphviz to generate call graphs using dot (for the GIF printer):
Expand Down

0 comments on commit ef28472

Please sign in to comment.