Class: PerfMonger::Command::LiveOption

Inherits:
RecordOption show all
Defined in:
lib/perfmonger/command/live.rb

Instance Attribute Summary

Attributes inherited from RecordOption

#background, #devices, #interval, #kill, #logfile, #no_disk, #parser, #record_bin, #report_cpu, #status, #verbose

Instance Method Summary collapse

Methods inherited from RecordOption

parse, #parse

Constructor Details

#initializeLiveOption

Returns a new instance of LiveOption.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/perfmonger/command/live.rb', line 10

def initialize
  super

  @color = false
  @parser.on("-c", "--color", "Use colored JSON output") do
    @color = true
  end

  @pretty
  @parser.on("--pretty",  "Use human readable JSON output") do
    @pretty = true
  end

end

Instance Method Details

#make_commandObject



25
26
27
28
29
30
31
32
33
# File 'lib/perfmonger/command/live.rb', line 25

def make_command
  cmd = super()
  @player_bin = ::PerfMonger::Command::CoreFinder.player()
  cmd += ["-player-bin", @player_bin]
  cmd << "-color" if @color
  cmd << "-pretty" if @pretty

  cmd
end