module NoBrainer::Profiler::ControllerRuntime
Rails specific. TODO Test
Public Instance Methods
append_info_to_payload(payload)
click to toggle source
Calls superclass method
# File lib/no_brainer/profiler/controller_runtime.rb, line 60 def append_info_to_payload(payload) super payload[:nobrainer_profiler] = Profiler.current end
cleanup_view_runtime()
click to toggle source
Calls superclass method
# File lib/no_brainer/profiler/controller_runtime.rb, line 49 def cleanup_view_runtime return super unless Profiler.current time_spent_in_db_before_views = Profiler.current.total_duration runtime = super time_spent_in_db_after_views = Profiler.current.total_duration time_spent_in_db_during_views = (time_spent_in_db_after_views - time_spent_in_db_before_views) * 1000 runtime - time_spent_in_db_during_views end
process_action(action, *args)
click to toggle source
Calls superclass method
# File lib/no_brainer/profiler/controller_runtime.rb, line 42 def process_action(action, *args) Profiler.spawn_controller_profiler super ensure Profiler.cleanup_controller_profiler end