class OneApm::Collector::StatsEngine::GCProfiler::RailsBenchProfiler

Public Class Methods

enabled?() click to toggle source
# File lib/one_apm/collector/stats_engine/gc_profiler.rb, line 66
def self.enabled?
  ::GC.respond_to?(:time) && ::GC.respond_to?(:collections)
end

Public Instance Methods

call_count() click to toggle source
# File lib/one_apm/collector/stats_engine/gc_profiler.rb, line 74
def call_count
  ::GC.collections
end
call_time_s() click to toggle source
# File lib/one_apm/collector/stats_engine/gc_profiler.rb, line 70
def call_time_s
  ::GC.time.to_f / 1_000_000 # this value is reported in us, so convert to s
end
reset() click to toggle source
# File lib/one_apm/collector/stats_engine/gc_profiler.rb, line 78
def reset
  ::GC.clear_stats
end