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.



10
11
12
# File 'lib/datadog/profiling/tasks/exec.rb', line 10

def initialize(args)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

Instance Method Details

#rubyoptsObject



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

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

#runObject



14
15
16
17
# File 'lib/datadog/profiling/tasks/exec.rb', line 14

def run
  set_rubyopt!
  exec_with_error_handling(args)
end