Flowdock
method

render_with_benchmark

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActionController::Benchmarking

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

render_with_benchmark(options = nil, extra_options = {}, &block) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/benchmarking.rb, line 44
      def render_with_benchmark(options = nil, extra_options = {}, &block)
        if logger
          if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected?
            db_runtime = ActiveRecord::Base.connection.reset_runtime
          end

          render_output = nil
          @view_runtime = Benchmark.ms { render_output = render_without_benchmark(options, extra_options, &block) }

          if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected?
            @db_rt_before_render = db_runtime
            @db_rt_after_render = ActiveRecord::Base.connection.reset_runtime
            @view_runtime -= @db_rt_after_render
          end

          render_output
        else
          render_without_benchmark(options, extra_options, &block)
        end
      end
Register or log in to add new notes.