Skip to content

Commit e3b0707

Browse files
p8litongjava
authored andcommitted
[ruby/sinatra] Remove Unicorn variant (TechEmpower#9891)
Unicorn hasn't been updated for 4 years and seems unmaintained. It isn't the fastest on any of the benchmarks either.
1 parent 1539c71 commit e3b0707

File tree

13 files changed

+13
-196
lines changed

13 files changed

+13
-196
lines changed

frameworks/Ruby/sinatra-sequel/Gemfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@ end
2020
group :puma, optional: true do
2121
gem 'puma', '~> 6.4', require: false
2222
end
23-
24-
group :unicorn, optional: true do
25-
gem 'unicorn', '~> 6.1', platforms: [:ruby, :mswin], require: false
26-
end

frameworks/Ruby/sinatra-sequel/Gemfile.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ GEM
55
bigdecimal (3.1.9)
66
iodine (0.7.58)
77
json (2.11.3)
8-
kgio (2.11.4)
98
logger (1.6.6)
109
mustermann (3.0.3)
1110
ruby2_keywords (~> 0.0.1)
@@ -22,7 +21,6 @@ GEM
2221
rack-session (2.1.0)
2322
base64 (>= 0.1.0)
2423
rack (>= 3.0.0)
25-
raindrops (0.20.1)
2624
ruby2_keywords (0.0.5)
2725
sequel (5.90.0)
2826
bigdecimal
@@ -37,9 +35,6 @@ GEM
3735
rack-session (>= 2.0.0, < 3)
3836
tilt (~> 2.0)
3937
tilt (2.6.0)
40-
unicorn (6.1.0)
41-
kgio (~> 2.6)
42-
raindrops (~> 0.7)
4338

4439
PLATFORMS
4540
ruby
@@ -55,7 +50,6 @@ DEPENDENCIES
5550
sequel (~> 5.0)
5651
sequel_pg (~> 1.6)
5752
sinatra (~> 4.0)
58-
unicorn (~> 6.1)
5953

6054
BUNDLED WITH
6155
2.6.2

frameworks/Ruby/sinatra-sequel/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ comparing a variety of web platforms.
1313
The tests will be run with:
1414

1515
* [Ruby 3.4](http://www.ruby-lang.org)
16-
* [JRuby 9.4](http://jruby.org)
1716
* [Puma 6](http://puma.io)
18-
* [Passenger 6](https://www.phusionpassenger.com)
19-
* [Unicorn 5](https://bogomips.org/unicorn/)
2017
* [Sinatra 4](http://www.sinatrarb.com)
2118
* [Sequel 5](http://sequel.jeremyevans.net)
22-
* [Slim 3](http://slim-lang.com)
2319
* [MySQL 5.5](https://www.mysql.com)
2420
* [Postgres 9.3](https://www.postgresql.org)
2521

frameworks/Ruby/sinatra-sequel/benchmark_config.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,6 @@
6161
"display_name": "sinatra-sequel-postgres-iodine-mri",
6262
"versus": "rack-sequel-postgres-iodine-mri",
6363
"notes": ""
64-
},
65-
"postgres-unicorn-mri": {
66-
"db_url": "/db",
67-
"query_url": "/queries?queries=",
68-
"fortune_url": "/fortunes",
69-
"update_url": "/updates?queries=",
70-
"port": 8080,
71-
"approach": "Realistic",
72-
"classification": "Micro",
73-
"database": "Postgres",
74-
"framework": "sinatra",
75-
"language": "Ruby",
76-
"orm": "Full",
77-
"platform": "Rack",
78-
"webserver": "Unicorn",
79-
"os": "Linux",
80-
"database_os": "Linux",
81-
"display_name": "sinatra-sequel-postgres-unicorn-mri",
82-
"versus": "rack-sequel-postgres-unicorn-mri",
83-
"notes": ""
8464
}
8565
}
8666
]

frameworks/Ruby/sinatra-sequel/boot.rb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def connect(dbtype)
1616
Bundler.require(dbtype) # Load database-specific modules
1717

1818
adapters = {
19-
:mysql=>{ :jruby=>'jdbc:mysql', :mri=>'mysql2' },
20-
:postgresql=>{ :jruby=>'jdbc:postgresql', :mri=>'postgres' }
19+
mysql: 'mysql2',
20+
postgresql: 'postgres'
2121
}
2222

2323
opts = {}
@@ -26,17 +26,15 @@ def connect(dbtype)
2626
if defined?(Puma) && (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
2727
opts[:max_connections] = (2 * Math.log(threads)).floor
2828
opts[:pool_timeout] = 10
29-
elsif defined?(Unicorn)
30-
Sequel.single_threaded = true
3129
end
3230

3331
Sequel.connect \
3432
'%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}' % {
35-
:adapter=>adapters.fetch(dbtype).fetch(defined?(JRUBY_VERSION) ? :jruby : :mri),
36-
:host=>'tfb-database',
37-
:database=>'hello_world',
38-
:user=>'benchmarkdbuser',
39-
:password=>'benchmarkdbpass'
33+
adapter: (dbtype == :mysql ? 'mysql2' : 'postgresql'),
34+
host: 'tfb-database',
35+
database: 'hello_world',
36+
user: 'benchmarkdbuser',
37+
password: 'benchmarkdbpass'
4038
}, opts
4139
end
4240

frameworks/Ruby/sinatra-sequel/config.toml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -34,71 +34,3 @@ orm = "Full"
3434
platform = "Rack"
3535
webserver = "Puma"
3636
versus = "rack-sequel-puma-mri"
37-
38-
[postgres-passenger-mri]
39-
urls.plaintext = "/plaintext"
40-
urls.json = "/json"
41-
urls.db = "/db"
42-
urls.query = "/queries?queries="
43-
urls.update = "/updates?queries="
44-
urls.fortune = "/fortunes"
45-
approach = "Realistic"
46-
classification = "Micro"
47-
database = "Postgres"
48-
database_os = "Linux"
49-
os = "Linux"
50-
orm = "Full"
51-
platform = "Rack"
52-
webserver = "Passenger"
53-
versus = "rack-sequel-postgres-passenger-mri"
54-
55-
[postgres-unicorn-mri]
56-
urls.plaintext = "/plaintext"
57-
urls.json = "/json"
58-
urls.db = "/db"
59-
urls.query = "/queries?queries="
60-
urls.update = "/updates?queries="
61-
urls.fortune = "/fortunes"
62-
approach = "Realistic"
63-
classification = "Micro"
64-
database = "Postgres"
65-
database_os = "Linux"
66-
os = "Linux"
67-
orm = "Full"
68-
platform = "Rack"
69-
webserver = "Unicorn"
70-
versus = "rack-sequel-postgres-unicorn-mri"
71-
72-
[passenger-mri]
73-
urls.plaintext = "/plaintext"
74-
urls.json = "/json"
75-
urls.db = "/db"
76-
urls.query = "/queries?queries="
77-
urls.update = "/updates?queries="
78-
urls.fortune = "/fortunes"
79-
approach = "Realistic"
80-
classification = "Micro"
81-
database = "MySQL"
82-
database_os = "Linux"
83-
os = "Linux"
84-
orm = "Full"
85-
platform = "Rack"
86-
webserver = "Passenger"
87-
versus = "rack-sequel-passenger-mri"
88-
89-
[unicorn-mri]
90-
urls.plaintext = "/plaintext"
91-
urls.json = "/json"
92-
urls.db = "/db"
93-
urls.query = "/queries?queries="
94-
urls.update = "/updates?queries="
95-
urls.fortune = "/fortunes"
96-
approach = "Realistic"
97-
classification = "Micro"
98-
database = "MySQL"
99-
database_os = "Linux"
100-
os = "Linux"
101-
orm = "Full"
102-
platform = "Rack"
103-
webserver = "Unicorn"
104-
versus = "rack-sequel-unicorn-mri"

frameworks/Ruby/sinatra-sequel/config/mri_unicorn.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

frameworks/Ruby/sinatra/Gemfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ end
1919
group :puma, optional: true do
2020
gem 'puma', '~> 6.4', require: false
2121
end
22-
23-
group :unicorn, optional: true do
24-
gem 'unicorn', '~> 6.1', platforms: [:ruby, :mswin], require: false
25-
end

frameworks/Ruby/sinatra/benchmark_config.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,6 @@
6565
"display_name": "sinatra-postgres-iodine-mri",
6666
"versus": "rack-postgres-iodine-mri",
6767
"notes": ""
68-
},
69-
"postgres-unicorn-mri": {
70-
"db_url": "/db",
71-
"query_url": "/queries?queries=",
72-
"fortune_url": "/fortunes",
73-
"update_url": "/updates?queries=",
74-
"port": 8080,
75-
"approach": "Realistic",
76-
"classification": "Micro",
77-
"database": "Postgres",
78-
"framework": "sinatra",
79-
"language": "Ruby",
80-
"orm": "Full",
81-
"platform": "Rack",
82-
"webserver": "Unicorn",
83-
"os": "Linux",
84-
"database_os": "Linux",
85-
"display_name": "sinatra-postgres-unicorn-mri",
86-
"versus": "rack-postgres-unicorn-mri",
87-
"notes": ""
8868
}
8969
}
9070
]

0 commit comments

Comments
 (0)