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