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.
6
7
8
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 6
def initialize
super :objects
end
|
Class Method Details
14
15
16
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 14
def self.supported_on_this_platform?
defined?(ObjectSpace) && ObjectSpace.respond_to?(:live_objects)
end
|
Instance Method Details
18
19
20
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 18
def poll
stats.record_data_point(ObjectSpace.live_objects)
end
|
10
11
12
|
# File 'lib/new_relic/agent/samplers/object_sampler.rb', line 10
def stats
stats_engine.get_stats_no_scope("GC/objects")
end
|