Class: NewRelic::Agent::StatsEngine::GCProfiler::Rubinius

Inherits:
Profiler
  • Object
show all
Defined in:
lib/new_relic/agent/stats_engine/gc_profiler.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Profiler

#capture, #initialize, #reset

Constructor Details

This class inherits a constructor from NewRelic::Agent::StatsEngine::GCProfiler::Profiler

Class Method Details

.enabled?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 101

def self.enabled?
  defined?(::Rubinius) && defined?(::Rubinius::GC) && ::Rubinius::GC.respond_to?(:count)
end

Instance Method Details

#call_countObject



109
110
111
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 109

def call_count
  ::Rubinius::GC.count
end

#call_timeObject



105
106
107
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 105

def call_time
  ::Rubinius::GC.time * 1000
end