Sha256: 967a06022e071b3ee12b60a78a4efbe66a2175177c8017e43d2d1d9a20ba624e

Contents?: true

Size: 537 Bytes

Versions: 109

Compression:

Stored size: 537 Bytes

Contents

require 'new_relic/agent/sampler'

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

109 entries across 109 versions & 5 rubygems

Version Path
newrelic_rpm-2.14.1.logging1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.14.1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.14.0 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.6.beta2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.6.beta1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.5.beta4 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.5.beta3 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.5.beta2 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-2.13.5.beta1 lib/new_relic/agent/samplers/object_sampler.rb