aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-11-20 04:50:34 +0530
committerPratik Naik <pratiknaik@gmail.com>2008-11-20 04:50:34 +0530
commitdbbaccbcda7475766919723dda53c0f92afddc4b (patch)
tree0e676f7752a4817b6e936628161e03e35b0c2b29 /actionpack/lib/action_controller/base.rb
parent3be9134d1cb882f4be3be8d57b2f8bde5ecde887 (diff)
downloadrails-dbbaccbcda7475766919723dda53c0f92afddc4b.tar.gz
rails-dbbaccbcda7475766919723dda53c0f92afddc4b.tar.bz2
rails-dbbaccbcda7475766919723dda53c0f92afddc4b.zip
Revert "Simplify benchmarking and rescue". Need a different approach.
This reverts commit 3be9134d1cb882f4be3be8d57b2f8bde5ecde887.
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rw-r--r--actionpack/lib/action_controller/base.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 9c10c9a1d6..ad6562024a 100644
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -264,7 +264,7 @@ module ActionController #:nodoc:
# Controller specific instance variables which will not be accessible inside views.
@@protected_instance_variables = %w(@assigns @performed_redirect @performed_render @variables_added @request_origin @url @parent_controller
@action_name @before_filter_chain_aborted @action_cache_path @_session @_cookies @_headers @_params
- @_flash @_response @_runtime)
+ @_flash @_response)
# Prepends all the URL-generating helpers from AssetHelper. This makes it possible to easily move javascripts, stylesheets,
# and images to a dedicated asset server away from the main web server. Example:
@@ -862,9 +862,6 @@ module ActionController #:nodoc:
#
# render :xml => post.to_xml, :status => :created, :location => post_url(post)
def render(options = nil, extra_options = {}, &block) #:doc:
- start = Time.now
- reset_db_runtime
-
raise DoubleRenderError, "Can only render or redirect once per action" if performed?
if options.nil?
@@ -943,9 +940,6 @@ module ActionController #:nodoc:
render_for_file(default_template_name, options[:status], layout)
end
end
- ensure
- @_runtime[:render] = Time.now - start
- log_render_benchmark
end
# Renders according to the same rules as <tt>render</tt>, but returns the result in a string instead
@@ -1214,7 +1208,6 @@ module ActionController #:nodoc:
@template = @_response.template
@_headers = @_response.headers
- @_runtime = {}
end
def initialize_current_url
@@ -1256,8 +1249,6 @@ module ActionController #:nodoc:
end
def perform_action
- start = Time.now
-
if action_methods.include?(action_name)
send(action_name)
default_render unless performed?
@@ -1269,11 +1260,6 @@ module ActionController #:nodoc:
else
raise UnknownAction, "No action responded to #{action_name}. Actions: #{action_methods.sort.to_sentence}", caller
end
- rescue Exception => exception
- rescue_action(exception)
- ensure
- @_runtime[:perform_action] = Time.now - start
- log_benchmarks
end
def performed?