Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (15 sloc) 0.894 kb
d680b824 »
2009-01-29 Add license
1 = Action Profiler
2
8dd002cf »
2009-01-29 Update docs
3 `gem install ruby-prof` then add ?profile=process_time to any URL to profile
4 the page load and download a calltree file. Open it with kcachegrind.
5
6 Add an around_filter :action_profiler to ApplicationController:
7
8 around_filter :action_profiler unless Rails.env.production?
9
10 Enable live profiling in production accessible to specific IP addresses:
11
12 ALLOWED_IPS = ['127.0.0.1', '1.2.3.4']
13 around_filter :action_profiler, :if =>
14 lambda { |c| ALLOWED_IPS.include?(c.request.remote_ip) }
15
16 If you're using Ruby Enterprise Edition or a patched Ruby 1.8, you can profile
17 memory and object allocation also: ?profile=memory or allocations.
18
19 This plugin uses an around_filter to profile the controller action only.
20 Rack::Profiler, part of rack-contrib, can profile the entire Rails request.
d680b824 »
2009-01-29 Add license
21
22 == License
23
24 Released under the MIT license, copyright (c) 2007-2009 37signals, LLC.
Something went wrong with that request. Please try again.