21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/simple_perf/cli.rb', line 21
def self.start
cmd = ARGV.shift
case cmd
when 'start_jmeter'
CLI::StartJmeter.new.execute
when 'start_gatling'
CLI::StartGatling.new.execute
when 'start_custom'
CLI::StartCustom.new.execute
when 'stop'
CLI::Stop.new.execute
when 'deploy'
CLI::Deploy.new.execute
when 'create_jmeter'
CLI::CreateJmeter.new.execute
when 'create_gatling'
CLI::CreateGatling.new.execute
when 'create_bucket'
CLI::CreateBucket.new.execute
when 'destroy'
CLI::Destroy.new.execute
when 'status'
CLI::Status.new.execute
when 'results'
CLI::Results.new.execute
when 'update'
CLI::Update.new.execute
when 'chaos'
CLI::Chaos.new.execute
when '-h'
puts "simple_perf [start_jmeter|start_gatling|start_custom|stop|deploy|create_jmeter|create_gatling|create_bucket|destroy|status|results|update|chaos] [options]"
puts "Append -h for help on specific subcommand."
when '-v'
puts SimplePerf::VERSION
else
puts "Unknown command: '#{cmd}'."
puts "simple_perf [start_jmeter|start_gatling|start_custom|stop|deploy|create_jmeter|create_gatling|create_bucket|destroy|status|results|update|chaos] [options]"
puts "Append -h for help on specific subcommand."
exit 1
end
end
|