aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/benchmarking.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/benchmarking.rb')
-rw-r--r--actionpack/lib/action_controller/benchmarking.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/benchmarking.rb b/actionpack/lib/action_controller/benchmarking.rb
index 6a78ad5dac..55aed1bca1 100644
--- a/actionpack/lib/action_controller/benchmarking.rb
+++ b/actionpack/lib/action_controller/benchmarking.rb
@@ -20,13 +20,17 @@ module ActionController #:nodoc:
render_without_benchmark(options, deprecated_status)
else
db_runtime = ActiveRecord::Base.connection.reset_runtime if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected?
- @rendering_runtime = Benchmark::measure{ render_without_benchmark(options, deprecated_status) }.real
+
+ render_output = nil
+ @rendering_runtime = Benchmark::measure{ render_output = render_without_benchmark(options, deprecated_status) }.real
if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected?
@db_rt_before_render = db_runtime
@db_rt_after_render = ActiveRecord::Base.connection.reset_runtime
@rendering_runtime -= @db_rt_after_render
end
+
+ render_output
end
end