Class: NewRelic::Agent::Samplers::ObjectSampler
Instance Attribute Summary
#id, #stats_engine
Class Method Summary
collapse
Instance Method Summary
collapse
inherited, sampler_classes, use_harvest_sampler?
Constructor Details
Returns a new instance of ObjectSampler.
8
9
10
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 8
def initialize
super :objects
end
|
Class Method Details
16
17
18
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 16
def self.supported_on_this_platform?
defined?(ObjectSpace) && ObjectSpace.respond_to?(:live_objects)
end
|
Instance Method Details
#poll ⇒ Object
20
21
22
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 20
def poll
stats.record_data_point(ObjectSpace.live_objects)
end
|
#stats ⇒ Object
12
13
14
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 12
def stats
stats_engine.get_stats_no_scope("GC/objects")
end
|