class SimpleProfiler::Event

Public Instance Methods

to_s() click to toggle source
# File lib/simple_profiler/event.rb, line 12
def to_s
  separator = target == :class ? '.' : '#'
  "#{klass}#{separator}#{method} -> #{total_time.round(4)} sec. - #{used_memory}MB - (Total Memory: #{memory_at_end}MB)"
end
total_time() click to toggle source
# File lib/simple_profiler/event.rb, line 4
def total_time
  finalized_at - started_at
end
used_memory() click to toggle source
# File lib/simple_profiler/event.rb, line 8
def used_memory
  memory_at_end - memory_at_beginning
end