Class: Benchmark::HTTP::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Benchmark::HTTP::Command::Top
- Defined in:
- lib/benchmark/http/command.rb
Instance Method Summary collapse
Instance Method Details
#invoke(program_name: File.basename($0)) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/benchmark/http/command.rb', line 55 def invoke(program_name: File.basename($0)) if verbose? Async.logger.level = Logger::DEBUG elsif quiet? Async.logger.level = Logger::WARN else Async.logger.level = Logger::INFO end if @options[:version] puts "benchmark-http v#{VERSION}" elsif @options[:help] or @command.nil? print_usage(program_name) else @command.invoke(self) end end |
#quiet? ⇒ Boolean
51 52 53 |
# File 'lib/benchmark/http/command.rb', line 51 def quiet? @options[:logging] == :quiet end |
#verbose? ⇒ Boolean
47 48 49 |
# File 'lib/benchmark/http/command.rb', line 47 def verbose? @options[:logging] == :verbose end |