class NewRelic::Agent::StatsEngine::GCProfiler::RailsBenchProfiler

Public Class Methods

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

Public Instance Methods

call_count() click to toggle source
# File lib/new_relic/agent/stats_engine/gc_profiler.rb, line 76
def call_count
  ::GC.collections
end
call_time_s() click to toggle source
# File lib/new_relic/agent/stats_engine/gc_profiler.rb, line 72
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/new_relic/agent/stats_engine/gc_profiler.rb, line 80
def reset
  ::GC.clear_stats
end