Sha256: d63bceadc430392d489fa0bdb07a19c2edd49535ccbeb0241751eaa6f1cf8211

Contents?: true

Size: 417 Bytes

Versions: 6

Compression:

Stored size: 417 Bytes

Contents

# typed: true
module Datadog
  module Core
    module Environment
      # Retrieves number of classes from runtime
      module ClassCount
        module_function

        def value
          ::ObjectSpace.count_objects[:T_CLASS]
        end

        def available?
          ::ObjectSpace.respond_to?(:count_objects) \
           && ::ObjectSpace.count_objects.key?(:T_CLASS)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ddtrace-1.0.0.beta1 lib/datadog/core/environment/class_count.rb
ddtrace-0.54.2 lib/datadog/core/environment/class_count.rb
ddtrace-0.54.1 lib/datadog/core/environment/class_count.rb
ddtrace-0.54.0 lib/datadog/core/environment/class_count.rb
ddtrace-0.53.0 lib/datadog/core/environment/class_count.rb
ddtrace-0.52.0 lib/datadog/core/environment/class_count.rb