-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbento
executable file
·37 lines (24 loc) · 901 Bytes
/
bento
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env ruby
require "bundler/setup"
$stdout.puts "YJIT is enabled 🎉" if RUBY_DESCRIPTION =~ /\+YJIT/
require "optparse"
$benchmark_server = :puma
OptionParser.new do |opts|
opts.banner = "Usage: bento [options]"
opts.on('--puma', 'Run Rails via Puma server') do |v|
$benchmark_server = :puma
end
opts.on('--anycable', 'Run AnyCable RPC server') do |v|
$benchmark_server = :anycable
end
opts.on('--falcon', 'Run Falcon/Async server') do |v|
$benchmark_server = :falcon
end
opts.on('--iodine', 'Run Iodine server') do |v|
$benchmark_server = :iodine
end
end.parse!
require_relative "lib/application"
desc = defined?(ActionCableNext) ? "Action Cable Next #{ActionCableNext::VERSION} on Rails #{Rails::VERSION::STRING}" : "Action Cable #{Rails::VERSION::STRING}"
$stdout.puts "⚡️ Running #{desc} via #{$benchmark_server}"
BenchmarkServer.run!