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
wd_newrelic_rpm-3.5.8 lib/new_relic/agent/samplers/object_sampler.rb
sundawg_newrelic_rpm-3.5.8.2 lib/new_relic/agent/samplers/object_sampler.rb
sundawg_newrelic_rpm-3.5.8.1 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.8.72 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.8.70 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.8.64.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.7.59 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.7.59.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.7.58.beta lib/new_relic/agent/samplers/object_sampler.rb
wd_newrelic_rpm-3.5.6 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.7.57.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.6.55 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.6.48.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.6.46.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.6.42.beta lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.5.39.beta lib/new_relic/agent/samplers/object_sampler.rb
wd_newrelic_rpm-3.5.5 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.5.38 lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.5.540.dev lib/new_relic/agent/samplers/object_sampler.rb
newrelic_rpm-3.5.4.35.beta lib/new_relic/agent/samplers/object_sampler.rb