19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/puma/benchmark.rb', line 19
def self.parse(options)
params = {}
opt_parser = OptionParser.new do |opts|
opts.banner = "Usage: puma-benchmark [options]"
opts.on("-b", "--base_url [BASE_URL]", URI, "Application base url for
benchmarking, default: http://localhost:3000")
opts.on("-a", "--api API", "API for benchmarking, example: /homes.json")
opts.on("-e", "--environment", "default: production")
opts.on("-t", "--threads [Max Thread]", "Max thread to be used per worker, default: 4")
opts.on("-w", "--workers [Max Worker]", "Max worker to be used for benchmarking, default: 4")
opts.on("-d", "--duration [Duration]", "Duration for each test (in seconds), default: 30")
opts.on("-h", "--help", "Prints this help") do
puts opts
exit
end
end.parse!(into: params)
run(params)
end
|