Class: NewRelic::Agent::StatsEngine::GCProfiler::RubiniusAgent
- Inherits:
-
Profiler
- Object
- Profiler
- NewRelic::Agent::StatsEngine::GCProfiler::RubiniusAgent
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
Class Method Details
.enabled? ⇒ Boolean
115
116
117
118
119
120
121
122
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 115
def self.enabled?
if NewRelic::LanguageSupport.using_engine?('rbx')
require 'rubinius/agent'
true
else
false
end
end
|
Instance Method Details
#call_count ⇒ Object
130
131
132
133
134
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 130
def call_count
agent = ::Rubinius::Agent.loopback
agent.get('system.gc.young.count')[1] +
agent.get('system.gc.full.count')[1]
end
|
#call_time ⇒ Object
124
125
126
127
128
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 124
def call_time
agent = ::Rubinius::Agent.loopback
(agent.get('system.gc.young.total_wallclock')[1] +
agent.get('system.gc.full.total_wallclock')[1]) * 1000
end
|