module Humid::ControllerRuntime

Private Instance Methods

append_info_to_payload(payload) click to toggle source
Calls superclass method
# File lib/humid/controller_runtime.rb, line 36
def append_info_to_payload(payload)
  super
  payload[:humid_runtime] = (humid_runtime || 0) + Humid::LogSubscriber.reset_runtime
end
cleanup_view_runtime() click to toggle source
Calls superclass method
# File lib/humid/controller_runtime.rb, line 23
def cleanup_view_runtime
  if logger&.info?
    humid_rt_before_render = Humid::LogSubscriber.reset_runtime
    self.humid_runtime = (humid_runtime || 0) + humid_rt_before_render
    runtime = super
    humid_rt_after_render = Humid::LogSubscriber.reset_runtime
    self.humid_runtime += humid_rt_after_render
    runtime - humid_rt_after_render
  else
    super
  end
end
process_action(action, *args) click to toggle source

Reset the runtime before each action.

Calls superclass method
# File lib/humid/controller_runtime.rb, line 18
def process_action(action, *args)
  Humid::LogSubscriber.reset_runtime
  super
end