Class: OneApm::Collector::StatsEngine::GCProfiler::RailsBenchProfiler
- Inherits:
-
Object
- Object
- OneApm::Collector::StatsEngine::GCProfiler::RailsBenchProfiler
- Defined in:
- lib/one_apm/collector/stats_engine/gc_profiler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.enabled? ⇒ Boolean
66 67 68 |
# File 'lib/one_apm/collector/stats_engine/gc_profiler.rb', line 66 def self.enabled? ::GC.respond_to?(:time) && ::GC.respond_to?(:collections) end |
Instance Method Details
#call_count ⇒ Object
74 75 76 |
# File 'lib/one_apm/collector/stats_engine/gc_profiler.rb', line 74 def call_count ::GC.collections end |
#call_time_s ⇒ Object
70 71 72 |
# File 'lib/one_apm/collector/stats_engine/gc_profiler.rb', line 70 def call_time_s ::GC.time.to_f / 1_000_000 # this value is reported in us, so convert to s end |
#reset ⇒ Object
78 79 80 |
# File 'lib/one_apm/collector/stats_engine/gc_profiler.rb', line 78 def reset ::GC.clear_stats end |