module Profiler

Constants

VERSION

Attributes

is_paused[RW]
profile[RW]

Public Class Methods

check(caller_offset=0) click to toggle source
# File lib/profiler.rb, line 23
def check(caller_offset=0)
  raise "Profiler hasn't started yet. Please call Profiler.start first." if self.profile.nil?
  return if is_paused
  profile.check(caller_offset)
end
pause() click to toggle source
# File lib/profiler.rb, line 15
def pause
  self.is_paused = true
end
result() click to toggle source
# File lib/profiler.rb, line 33
def result
  profile.result
end
resume() click to toggle source
# File lib/profiler.rb, line 19
def resume
  self.is_paused = false
end
start() click to toggle source
# File lib/profiler.rb, line 10
def start
  self.profile = Profile.new
  self.is_paused = false
end
stop() click to toggle source
# File lib/profiler.rb, line 29
def stop
  profile.stop
end