Module: ActionController::Instrumentation

Defined in:
lib/time_bandits/monkey_patches/action_controller.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#cleanup_view_runtimeObject

:nodoc:



7
8
9
10
11
12
# File 'lib/time_bandits/monkey_patches/action_controller.rb', line 7

def cleanup_view_runtime #:nodoc:
  consumed_before_rendering = TimeBandits.consumed
  runtime = yield
  consumed_during_rendering = TimeBandits.consumed - consumed_before_rendering
  runtime - consumed_during_rendering
end