Sha256: 4e2df15e555a2068560761ea4f8bbeaab2bbbe6ef565a7b54496e1df628a5c12

Contents?: true

Size: 348 Bytes

Versions: 12

Compression:

Stored size: 348 Bytes

Contents

module Datadog
  module Runtime
    # 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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-0.26.1 lib/ddtrace/runtime/class_count.rb
ddtrace-0.28.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.27.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.26.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.25.1 lib/ddtrace/runtime/class_count.rb
ddtrace-0.25.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.24.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.23.3 lib/ddtrace/runtime/class_count.rb
ddtrace-0.23.2 lib/ddtrace/runtime/class_count.rb
ddtrace-0.23.1 lib/ddtrace/runtime/class_count.rb
ddtrace-0.23.0 lib/ddtrace/runtime/class_count.rb
ddtrace-0.22.0 lib/ddtrace/runtime/class_count.rb