class RuntimeProfiler::ProcessActionEvent
Attributes
finished_at[R]
payload[R]
started_at[R]
Public Class Methods
new(args:)
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 5 def initialize(args:) _name, @started_at, @finished_at, _unique_id, @payload = args end
Public Instance Methods
db_runtime()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 17 def db_runtime @db_runtime ||= @payload[:db_runtime] end
key()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 29 def key @key ||= Digest::MD5.hexdigest(path.downcase) end
path()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 25 def path @path ||= @payload[:path].gsub(/(\S=)(?:(?!&).)+/, '\1xxx').gsub(/(\d+)/, 'xxx') end
recordable?()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 21 def recordable? true # NB: We may be putting login on this in the future end
total_runtime()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 9 def total_runtime 1000.0 * (@finished_at - @started_at) end
view_runtime()
click to toggle source
# File lib/runtime_profiler/events/process_action_event.rb, line 13 def view_runtime @view_runtime ||= @payload[:view_runtime] end