Class: NewRelic::Agent::StatsEngine::GCProfiler::RailsBenchProfiler
- Inherits:
-
Object
- Object
- NewRelic::Agent::StatsEngine::GCProfiler::RailsBenchProfiler
- Defined in:
- lib/new_relic/agent/stats_engine/gc_profiler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.enabled? ⇒ Boolean
68 69 70 |
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 68 def self.enabled? ::GC.respond_to?(:time) && ::GC.respond_to?(:collections) end |
Instance Method Details
#call_count ⇒ Object
76 77 78 |
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 76 def call_count ::GC.collections end |
#call_time_s ⇒ Object
72 73 74 |
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 72 def call_time_s ::GC.time.to_f / 1_000_000 # this value is reported in us, so convert to s end |
#reset ⇒ Object
80 81 82 |
# File 'lib/new_relic/agent/stats_engine/gc_profiler.rb', line 80 def reset ::GC.clear_stats end |