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
82
83
84
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 82
def self.enabled?
defined?(::GC::Profiler) && ::GC::Profiler.enabled?
end
|
Instance Method Details
#call_count ⇒ Object
92
93
94
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 92
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.
88
89
90
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 88
def call_time
::GC::Profiler.total_time * 1_000_000.0 end
|
#reset ⇒ Object
96
97
98
99
|
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 96
def reset
::GC::Profiler.clear
@last_timestamp = 0
end
|