class Datadog::Profiler

Profiling entry point, which coordinates collectors and a scheduler

Attributes

collectors[R]
scheduler[R]

Public Class Methods

new(collectors, scheduler) click to toggle source
# File lib/ddtrace/profiling/profiler.rb, line 9
def initialize(collectors, scheduler)
  @collectors = collectors
  @scheduler = scheduler
end

Public Instance Methods

shutdown!() click to toggle source
# File lib/ddtrace/profiling/profiler.rb, line 19
def shutdown!
  Datadog.logger.debug('Shutting down profiler')

  collectors.each do |collector|
    collector.enabled = false
    collector.stop(true)
  end

  scheduler.enabled = false
  scheduler.stop(true)
end
start() click to toggle source
# File lib/ddtrace/profiling/profiler.rb, line 14
def start
  collectors.each(&:start)
  scheduler.start
end