Class: Ritsudo::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/ritsudo/cli.rb

Instance Method Summary collapse

Instance Method Details

#benchmarkObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ritsudo/cli.rb', line 17

def benchmark()
  match = options[:match] ? Regexp.new(options[:match]) : nil
  collector =  Ritsudo::Collector.new(match: match)
  benchmark = Ritsudo::Benchmark.new(collector: collector)
  benchmark.do(options[:url],
               count: options[:count],
               sub_process_timeout: options[:sub_process_timeout],
               driver_options: {
                 timeout: options[:timeout],
                 wait_time: options[:wait_time],
                 user_agent: options[:ua],
                 cookies: options[:cookies]
               }
              )
  benchmark.collector.report(outliters_stdev_multiple: options[:outliters_stdev_multiple])
end