module SimplePerf::CLI

Public Class Methods

start() click to toggle source
# File lib/simple_perf/cli.rb, line 22
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 'gatling_results'
    CLI::GatlingResults.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|gatling_results] [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|gatling_results] [options]"
    puts "Append -h for help on specific subcommand."
    exit 1
  end
end