Class: NewRelic::Agent::StatsEngine::GCProfiler::Ruby19
- Inherits:
-
Profiler
- Object
- Profiler
- NewRelic::Agent::StatsEngine::GCProfiler::Ruby19
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
Class Method Details
.enabled? ⇒ Boolean
78
79
80
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 78
def self.enabled?
defined?(::GC::Profiler) && ::GC::Profiler.enabled?
end
|
Instance Method Details
#call_count ⇒ Object
88
89
90
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 88
def call_count
::GC.count
end
|
#call_time ⇒ Object
microseconds spent in GC 1.9 total_time returns seconds. Don’t trust the docs. It’s seconds.
84
85
86
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 84
def call_time
::GC::Profiler.total_time * 1_000_000.0 end
|
#reset ⇒ Object
92
93
94
95
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 92
def reset
::GC::Profiler.clear
@last_timestamp = 0
end
|