Class: Datadog::Profiling::Tasks::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/profiling/tasks/exec.rb

Overview

Wraps command with Datadog profiling

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Exec

Returns a new instance of Exec.



8
9
10
# File 'lib/datadog/profiling/tasks/exec.rb', line 8

def initialize(args)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



6
7
8
# File 'lib/datadog/profiling/tasks/exec.rb', line 6

def args
  @args
end

Instance Method Details

#rubyoptsObject



17
18
19
20
21
# File 'lib/datadog/profiling/tasks/exec.rb', line 17

def rubyopts
  [
    '-rdatadog/profiling/preload'
  ]
end

#runObject



12
13
14
15
# File 'lib/datadog/profiling/tasks/exec.rb', line 12

def run
  set_rubyopt!
  exec_with_error_handling(args)
end