Sha256: dbf51f1ff4bc58bdb41175f192c4123b05a9d607046b08088bc14fb605a03892

Contents?: true

Size: 512 Bytes

Versions: 24

Compression:

Stored size: 512 Bytes

Contents

module NewRelic
  module Agent
    module Samplers
      class ObjectSampler < NewRelic::Agent::Sampler

        def initialize
          super :objects
        end

        def stats
          stats_engine.get_stats_no_scope("GC/objects")          
        end

        def self.supported_on_this_platform?
          defined?(ObjectSpace) && ObjectSpace.respond_to?(:live_objects)
        end

        def poll
          stats.record_data_point(ObjectSpace.live_objects)
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
onyx_newrelic_rpm-2.12.5 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.0.beta5 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.0.beta4 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.0.beta3 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.3 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.2.beta2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.2.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.1.alpha lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.12.0 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.3 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.2.beta2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.2.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.0.beta2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.11.0.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.10.8 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.10.6 lib/new_relic/agent/samplers/object_sampler.rb