Module: NoBrainer::Profiler::ControllerRuntime
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/no_brainer/profiler/controller_runtime.rb
Overview
Rails specific. TODO Test
Defined Under Namespace
Modules: ClassMethods
Classes: Profiler
Instance Method Summary
collapse
Instance Method Details
#append_info_to_payload(payload) ⇒ Object
60
61
62
63
|
# 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 ⇒ Object
49
50
51
52
53
54
55
56
57
58
|
# 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) ⇒ Object