Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Rack::Runtime middleware so the reported time includes the entire…

… middleware stack
  • Loading branch information...
commit 2d0c703c922758dc36df8a20a56894484013b0f1 1 parent df7faef
@josh josh authored
View
1  actionpack/lib/action_controller/metal/benchmarking.rb
@@ -53,7 +53,6 @@ def process_action(*args)
log_message << " [#{complete_request_uri rescue "unknown"}]"
logger.info(log_message)
- response.headers["X-Runtime"] = "%.0f" % ms
else
super
end
View
1  railties/lib/rails/application.rb
@@ -208,6 +208,7 @@ def call(env)
initializer :initialize_middleware_stack do
if config.frameworks.include?(:action_controller)
config.middleware.use(::Rack::Lock, :if => lambda { ActionController::Base.allow_concurrency })
+ config.middleware.use(::Rack::Runtime)
config.middleware.use(ActionDispatch::ShowExceptions, lambda { ActionController::Base.consider_all_requests_local })
config.middleware.use(ActionDispatch::Callbacks, lambda { ActionController::Dispatcher.prepare_each_request })
config.middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options })
Please sign in to comment.
Something went wrong with that request. Please try again.