Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 1040

Show
Ignore:
Timestamp:
03/31/05 00:35:54 (3 years ago)
Author:
bitsweat
Message:

Request profiler is an around filter that appends a method performance profile to the response body. It relies on Ruby 1.8-CVS and the ruby-prof C extension. Use ActionController::Base.profile_requests to configure profiling behavior.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/conductor/app/controllers/application.rb

    r1027 r1040  
     1require_dependency 'request_profiler' 
     2 
    13class ApplicationController < ActionController::Base 
     4  # Turns profiling on if ruby-prof is available. 
     5  # Use cpu timing mode for greater clock resolution. 
     6  profile_requests(:cpu) 
     7 
    28  before_filter :setup_database_connection 
    39  helper_method :configuration_name, :configurations