Sha256: b8daa0b6334c8d492305b140052fdf6cb8c1611a9632f6708423de4f970468bd

Contents?: true

Size: 434 Bytes

Versions: 15

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: 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

15 entries across 15 versions & 1 rubygems

Version Path
ddtrace-1.19.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.18.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.17.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.16.2 lib/datadog/core/environment/class_count.rb
ddtrace-1.16.1 lib/datadog/core/environment/class_count.rb
ddtrace-1.16.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.15.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.14.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.13.1 lib/datadog/core/environment/class_count.rb
ddtrace-1.13.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.12.1 lib/datadog/core/environment/class_count.rb
ddtrace-1.12.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.11.1 lib/datadog/core/environment/class_count.rb
ddtrace-1.11.0 lib/datadog/core/environment/class_count.rb
ddtrace-1.11.0.beta1 lib/datadog/core/environment/class_count.rb