Class: OneApm::Collector::Samplers::ObjectSampler
- Inherits:
-
OneApm::Collector::Sampler
- Object
- OneApm::Collector::Sampler
- OneApm::Collector::Samplers::ObjectSampler
- Defined in:
- lib/one_apm/collector/samplers/object_sampler.rb
Instance Attribute Summary
Attributes inherited from OneApm::Collector::Sampler
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from OneApm::Collector::Sampler
enabled?, inherited, #initialize, name, named, sampler_classes
Constructor Details
This class inherits a constructor from OneApm::Collector::Sampler
Class Method Details
.supported_on_this_platform? ⇒ Boolean
11 12 13 |
# File 'lib/one_apm/collector/samplers/object_sampler.rb', line 11 def self.supported_on_this_platform? OneApm::LanguageSupport.object_space_usable? && ObjectSpace.respond_to?(:live_objects) end |
Instance Method Details
#poll ⇒ Object
15 16 17 18 |
# File 'lib/one_apm/collector/samplers/object_sampler.rb', line 15 def poll live_objects = ObjectSpace.live_objects OneApm::Manager.record_metric("GC/objects", live_objects) end |