Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit c510928

Browse files
authored
[ruby/hanami] Only run on Iodine (#10597)
Replace the Puma default with Iodine, as it performs better than Puma in these benchmarks.
1 parent 5d030a2 commit c510928

5 files changed

Lines changed: 4 additions & 58 deletions

File tree

frameworks/Ruby/hanami/Gemfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,5 @@ gem "rom-sql", "~> 3.6"
1717
gem "pg"
1818

1919
group :iodine, optional: true do
20-
gem 'iodine', '~> 0.7', platforms: %i[ruby windows]
21-
end
22-
23-
group :puma, optional: true do
24-
gem 'puma', '~> 7.1'
20+
gem 'iodine', '~> 0.7'
2521
end

frameworks/Ruby/hanami/Gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,13 @@ GEM
133133
mustermann-contrib (3.0.3)
134134
hansi (~> 0.2.0)
135135
mustermann (= 3.0.3)
136-
nio4r (2.7.4)
137136
pg (1.5.9)
138137
pp (0.6.3)
139138
prettyprint
140139
prettyprint (0.2.0)
141140
psych (5.2.6)
142141
date
143142
stringio
144-
puma (7.1.0)
145-
nio4r (~> 2.0)
146143
rack (3.2.4)
147144
rack-session (2.1.1)
148145
base64 (>= 0.1.0)
@@ -207,7 +204,6 @@ DEPENDENCIES
207204
hanami-view (~> 2.3)
208205
iodine (~> 0.7)
209206
pg
210-
puma (~> 7.1)
211207
rake
212208
rom (~> 5.3)
213209
rom-sql (~> 3.6)

frameworks/Ruby/hanami/benchmark_config.json

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22
"framework": "hanami",
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": "Fullstack",
14-
"database": "Postgres",
15-
"framework": "hanami",
16-
"language": "Ruby",
17-
"orm": "Full",
18-
"platform": "Rack",
19-
"webserver": "Puma",
20-
"os": "Linux",
21-
"database_os": "Linux",
22-
"display_name": "hanami",
23-
"notes": "",
24-
"versus": ""
25-
},
26-
"iodine": {
275
"json_url": "/json",
286
"db_url": "/db",
297
"query_url": "/queries?queries=",
@@ -41,7 +19,7 @@
4119
"webserver": "Iodine",
4220
"os": "Linux",
4321
"database_os": "Linux",
44-
"display_name": "hanami [iodine]",
22+
"display_name": "hanami",
4523
"notes": "",
4624
"versus": ""
4725
}

frameworks/Ruby/hanami/hanami-iodine.dockerfile

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

frameworks/Ruby/hanami/hanami.dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ADD ./ /hanami
1111
WORKDIR /hanami
1212

1313
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
14-
RUN bundle config set with 'puma'
14+
RUN bundle config set with 'iodine'
1515
RUN bundle install --jobs=8
1616

1717
EXPOSE 8080
@@ -20,5 +20,4 @@ ENV HANAMI_ENV=production
2020
ENV HANAMI_PORT=8080
2121
ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world
2222

23-
CMD export WEB_CONCURRENCY=$(($(nproc)*5/4)) && \
24-
bundle exec hanami server
23+
CMD bundle exec iodine -p 8080 -w $(($(nproc)*5/4))

0 commit comments

Comments
 (0)