module Remnant::GC::Profiler::ClassMethods
Public Instance Methods
clear_stats()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 30 def clear_stats @raw_data = nil ::GC::Profiler.clear end
collections()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 18 def collections raw_data.size end
disable_stats()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 26 def disable_stats ::GC::Profiler.disable end
enable_stats()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 22 def enable_stats ::GC::Profiler.enable end
enabled?()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 5 def enabled? ::GC::Profiler.enabled? end
raw_data()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 14 def raw_data @raw_data ||= ::GC::Profiler.raw_data || [] end
time()
click to toggle source
# File lib/remnant/gc/profiler.rb, line 9 def time # returns time in seconds so convert to ms @time ||= raw_data.map {|data| data[:GC_TIME]}.sum * 1000 end