Skip to content

Commit 2dafb0c

Browse files
authored
[ruby/padrino] Only test with Iodine (#10258)
Unicorn is no longer maintained. Replace Puma with Iodine, as it performs better than Puma in these benchmarks.
1 parent 5eb97c4 commit 2dafb0c

File tree

10 files changed

+14
-274
lines changed

10 files changed

+14
-274
lines changed

frameworks/Ruby/padrino/Gemfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ gem 'slim', '2.0.3'
88
gem 'padrino', git: 'https://github.com/padrino/padrino-framework.git'
99
gem 'rack'
1010

11-
group :puma, optional: true do
12-
gem 'puma', '~> 7.1', require: false
13-
end
14-
15-
group :unicorn, optional: true do
16-
gem 'unicorn', '~> 6.1', platforms: [:ruby, :windows], require: false
11+
group :iodine, optional: true do
12+
gem "iodine", "~> 0.7", require: false
1713
end

frameworks/Ruby/padrino/Gemfile.lock

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ GEM
6666
drb (2.2.1)
6767
i18n (1.14.7)
6868
concurrent-ruby (~> 1.0)
69+
iodine (0.7.58)
6970
json (2.11.3)
70-
kgio (2.11.4)
7171
logger (1.6.6)
7272
mail (2.8.1)
7373
mini_mime (>= 0.1.1)
@@ -93,9 +93,6 @@ GEM
9393
timeout
9494
net-smtp (0.5.1)
9595
net-protocol
96-
nio4r (2.7.4)
97-
puma (7.1.0)
98-
nio4r (~> 2.0)
9996
rack (3.1.18)
10097
rack-protection (4.1.1)
10198
base64 (>= 0.1.0)
@@ -106,7 +103,6 @@ GEM
106103
rack (>= 3.0.0)
107104
rackup (2.2.1)
108105
rack (>= 3)
109-
raindrops (0.20.1)
110106
ruby2_keywords (0.0.5)
111107
securerandom (0.4.1)
112108
sinatra (4.1.1)
@@ -125,9 +121,6 @@ GEM
125121
timeout (0.4.3)
126122
tzinfo (2.0.6)
127123
concurrent-ruby (~> 1.0)
128-
unicorn (6.1.0)
129-
kgio (~> 2.6)
130-
raindrops (~> 0.7)
131124
uri (1.0.3)
132125

133126
PLATFORMS
@@ -137,13 +130,12 @@ PLATFORMS
137130

138131
DEPENDENCIES
139132
activerecord (>= 7.1)
133+
iodine (~> 0.7)
140134
json
141135
mysql2 (> 0.5)
142136
padrino!
143-
puma (~> 7.1)
144137
rack
145138
slim (= 2.0.3)
146-
unicorn (~> 6.1)
147139

148140
BUNDLED WITH
149141
2.7.0

frameworks/Ruby/padrino/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ comparing a variety of web servers.
1111
## Infrastructure Software Versions
1212
The tests were run with:
1313

14-
* [Ruby 2.0.0-p0](http://www.ruby-lang.org/)
15-
* [JRuby 1.7.8](http://jruby.org/)
16-
* [Rubinius 2.2.10](http://rubini.us/)
14+
* [Ruby 3.5](http://www.ruby-lang.org/)
1715
* [Padrino 0.12.3](http://www.padrinorb.com/)
18-
* [Rack 1.5.2](http://rack.github.com/)
19-
* [Unicorn 4.8.3](http://unicorn.bogomips.org/)
20-
* [Puma 3.9](http://puma.io/)
21-
* [Thin 1.6.2](http://code.macournoyer.com/thin/)
16+
* [Iodine](https://github.com/boazsegev/iodine)
2217

2318
## Paths & Source for Tests
2419

frameworks/Ruby/padrino/benchmark_config.json

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22
"framework": "padrino",
33
"tests": [{
44
"default": {
5-
"json_url": "/json",
6-
"db_url": "/db",
7-
"query_url": "/queries?queries=",
8-
"fortune_url": "/fortunes",
9-
"update_url": "/updates?queries=",
10-
"plaintext_url": "/plaintext",
11-
"port": 8080,
12-
"approach": "Realistic",
13-
"classification": "Micro",
14-
"database": "MySQL",
15-
"framework": "padrino",
16-
"language": "Ruby",
17-
"orm": "Full",
18-
"platform": "Rack",
19-
"webserver": "Puma",
20-
"os": "Linux",
21-
"database_os": "Linux",
22-
"display_name": "padrino [puma]",
23-
"notes": "",
24-
"versus": "rack-puma-mri"
25-
},
26-
"unicorn": {
275
"json_url": "/json",
286
"db_url": "/db",
297
"query_url": "/queries?queries=",
@@ -38,12 +16,12 @@
3816
"language": "Ruby",
3917
"orm": "Full",
4018
"platform": "Rack",
41-
"webserver": "Unicorn",
19+
"webserver": "Iodine",
4220
"os": "Linux",
4321
"database_os": "Linux",
44-
"display_name": "padrino [unicorn]",
22+
"display_name": "padrino",
4523
"notes": "",
46-
"versus": "rack-unicorn"
24+
"versus": "rack-iodine"
4725
}
4826
}]
4927
}

frameworks/Ruby/padrino/config.toml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,5 @@ database_os = "Linux"
1515
os = "Linux"
1616
orm = "Full"
1717
platform = "Rack"
18-
webserver = "Puma"
19-
versus = "rack-puma-mri"
20-
21-
[unicorn]
22-
urls.plaintext = "/plaintext"
23-
urls.json = "/json"
24-
urls.db = "/db"
25-
urls.query = "/queries?queries="
26-
urls.update = "/updates?queries="
27-
urls.fortune = "/fortunes"
28-
approach = "Realistic"
29-
classification = "Micro"
30-
database = "MySQL"
31-
database_os = "Linux"
32-
os = "Linux"
33-
orm = "Full"
34-
platform = "Rack"
35-
webserver = "Unicorn"
36-
versus = "rack-unicorn"
18+
webserver = "Iodine"
19+
versus = "rack-iodine"

frameworks/Ruby/padrino/config/nginx.conf

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

frameworks/Ruby/padrino/config/puma.rb

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

frameworks/Ruby/padrino/config/unicorn.rb

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

frameworks/Ruby/padrino/padrino-unicorn.dockerfile

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

frameworks/Ruby/padrino/padrino.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ COPY Gemfile Gemfile
1010
COPY Gemfile.lock Gemfile.lock
1111
COPY Rakefile Rakefile
1212

13-
RUN bundle config set with 'puma'
13+
RUN bundle config set with 'iodine'
1414
RUN bundle install --jobs=4 --gemfile=/padrino/Gemfile
1515

1616
EXPOSE 8080
1717

1818
ENV RUBY_YJIT_ENABLE=1
19+
ENV RACK_ENV=production
1920

20-
CMD bundle exec puma -C config/puma.rb
21+
CMD bundle exec iodine -p 8080 -w $(ruby config/auto_tune.rb | grep -Eo '[0-9]+' | head -n 1)

0 commit comments

Comments
 (0)