Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions frameworks/Ruby/grape/Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
source 'https://rubygems.org'

gem 'mysql2', '0.5.6'
gem 'unicorn', '6.1.0'
gem 'puma', '~> 7.1'
gem 'activerecord', '~> 8.1.0', :require => 'active_record'
gem 'grape', '2.1.1'
gem 'json', '~> 2.9'

group :iodine, optional: true do
gem "iodine", "~> 0.7", require: false
end

group :puma, optional: true do
gem "puma", "~> 7.1", require: false
end
8 changes: 2 additions & 6 deletions frameworks/Ruby/grape/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ GEM
zeitwerk
i18n (1.14.7)
concurrent-ruby (~> 1.0)
iodine (0.7.58)
json (2.16.0)
kgio (2.11.4)
logger (1.6.6)
minitest (5.25.4)
mustermann (3.0.3)
Expand All @@ -63,15 +63,11 @@ GEM
puma (7.1.0)
nio4r (~> 2.0)
rack (3.2.3)
raindrops (0.20.1)
ruby2_keywords (0.0.5)
securerandom (0.4.1)
timeout (0.4.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uri (1.0.3)
zeitwerk (2.7.2)

Expand All @@ -83,10 +79,10 @@ PLATFORMS
DEPENDENCIES
activerecord (~> 8.1.0)
grape (= 2.1.1)
iodine (~> 0.7)
json (~> 2.9)
mysql2 (= 0.5.6)
puma (~> 7.1)
unicorn (= 6.1.0)

BUNDLED WITH
2.7.0
6 changes: 3 additions & 3 deletions frameworks/Ruby/grape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ comparing a variety of web servers.
The tests were run with:

* [Ruby 3.4](http://www.ruby-lang.org/)
* [Grape 2.0.0](http://www.ruby-grape.org/)
* [Unicorn 6.1.0](https://yhbt.net/unicorn/)
* [Puma 6.4](https://puma.io/)
* [Grape 2.1](http://www.ruby-grape.org/)
* [Iodine](https://github.com/boazsegev/iodine)
* [Puma 7](https://puma.io/)

## Paths & Source for Tests

Expand Down
8 changes: 4 additions & 4 deletions frameworks/Ruby/grape/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"notes": "",
"versus": "rack-puma-mri"
},
"unicorn": {
"iodine": {
"json_url": "/json",
"db_url": "/db",
"query_url": "/query?queries=",
Expand All @@ -36,12 +36,12 @@
"language": "Ruby",
"orm": "Full",
"platform": "Rack",
"webserver": "Unicorn",
"webserver": "Iodine",
"os": "Linux",
"database_os": "Linux",
"display_name": "grape [unicorn]",
"display_name": "grape [iodine]",
"notes": "",
"versus": "rack-unicorn-mri"
"versus": "rack-iodine-mri"
}
}]
}
2 changes: 1 addition & 1 deletion frameworks/Ruby/grape/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module Acme
class API < Grape::API
before do
header 'Date', Time.now.httpdate if defined?(Puma)
header 'Server', 'WebServer'
header 'Server', 'grape'
end
logger nil
content_type :json, 'application/json'
Expand Down
6 changes: 3 additions & 3 deletions frameworks/Ruby/grape/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ platform = "Rack"
webserver = "Puma"
versus = "rack-puma-mri"

[unicorn]
[iodine]
urls.plaintext = "/plaintext"
urls.json = "/json"
urls.db = "/db"
Expand All @@ -30,5 +30,5 @@ database_os = "Linux"
os = "Linux"
orm = "Full"
platform = "Rack"
webserver = "Unicorn"
versus = "rack-unicorn-mri"
webserver = "Iodine"
versus = "rack-iodine-mri"
158 changes: 0 additions & 158 deletions frameworks/Ruby/grape/config/nginx.conf

This file was deleted.

15 changes: 0 additions & 15 deletions frameworks/Ruby/grape/config/unicorn.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ ADD ./ /grape

WORKDIR /grape

RUN bundle config set with 'iodine'
RUN bundle install --jobs=4 --gemfile=/grape/Gemfile

ENV RACK_ENV=production

EXPOSE 8080

CMD nginx -c /grape/config/nginx.conf && bundle exec unicorn -E production -c config/unicorn.rb
CMD bundle exec iodine -p 8080 -w $(ruby config/auto_tune.rb | grep -Eo '[0-9]+' | head -n 1)
1 change: 1 addition & 0 deletions frameworks/Ruby/grape/grape.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ADD ./ /grape

WORKDIR /grape

RUN bundle config set with 'puma'
RUN bundle install --jobs=4 --gemfile=/grape/Gemfile

ENV WEB_CONCURRENCY=auto
Expand Down
Loading