Sha256: 087ae26f969f42dfe01f4bca5cd34dc7d2945087a4af178ebde669f7ca228d49
Contents?: true
Size: 691 Bytes
Versions: 11
Compression:
Stored size: 691 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require 'new_relic/agent/sampler' module NewRelic module Agent module Samplers class ObjectSampler < NewRelic::Agent::Sampler def initialize super :objects end def self.supported_on_this_platform? NewRelic::LanguageSupport.object_space_usable? && ObjectSpace.respond_to?(:live_objects) end def poll live_objects = ObjectSpace.live_objects NewRelic::Agent.record_metric("GC/objects", live_objects) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems