Module: Datadog::Core::Environment::ThreadCount

Defined in:
lib/datadog/core/environment/thread_count.rb

Overview

Retrieves number of threads from runtime

Class Method Summary collapse

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/datadog/core/environment/thread_count.rb', line 14

def available?
  Thread.respond_to?(:list)
end

.valueObject



10
11
12
# File 'lib/datadog/core/environment/thread_count.rb', line 10

def value
  Thread.list.count
end