Class: Instrumentality::Profile::Custom

Inherits:
Instrumentality::Profile show all
Defined in:
lib/instrumentality/command/profile/custom.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Instrumentality::Profile

shared_arguments, shared_options, #validate_shared_arguments!

Constructor Details

#initialize(argv) ⇒ Custom

Returns a new instance of Custom.



23
24
25
26
# File 'lib/instrumentality/command/profile/custom.rb', line 23

def initialize(argv)
  super
  @script = argv.shift_argument
end

Class Method Details

.optionsObject



10
11
12
13
# File 'lib/instrumentality/command/profile/custom.rb', line 10

def self.options
  shared_options.concat([
  ]).concat(super)
end

Instance Method Details

#runObject



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/instrumentality/command/profile/custom.rb', line 33

def run
  config = OpenStruct.new({'script' => @script,
                           'process' => @process,
                           'workspace' => @workspace,
                           'project' => @project,
                           'scheme' => @scheme,
                           'server_port' => @server_port,
                           'interactive' => @interactive,
                           'experimental' => false})
  profiler = Profiler.new(config, @verbose)
  profiler.profile
end

#validate!Object



28
29
30
31
# File 'lib/instrumentality/command/profile/custom.rb', line 28

def validate!
  super
  validate_shared_arguments!
end