Browse files

Added a quick start section to README

  • Loading branch information...
1 parent 31bc3a0 commit ef28472d51fc8ec7576954e2a6a7c9ff3b979ba0 @bhb committed Dec 12, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
View
15 README.md
@@ -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):

0 comments on commit ef28472

Please sign in to comment.