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
9 changes: 4 additions & 5 deletions frameworks/Ruby/rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ group :postgresql, optional: true do
gem 'pg', '~> 1.5'
end

group :agoo, optional: true do
gem 'agoo', require: false
gem 'rackup'
end

group :iodine, optional: true do
gem 'iodine', '~> 0.7', require: false
end
Expand All @@ -28,3 +23,7 @@ end
group :puma, optional: true do
gem 'puma', '~> 6.5', require: false
end

group :pitchfork, optional: true do
gem 'pitchfork', '~> 0.17'
end
7 changes: 4 additions & 3 deletions frameworks/Ruby/rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ GEM
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
agoo (2.15.13)
async (2.23.0)
console (~> 1.29)
fiber-annotation
Expand Down Expand Up @@ -184,6 +183,9 @@ GEM
racc (~> 1.4)
openssl (3.3.0)
pg (1.5.9)
pitchfork (0.17.0)
logger
rack (>= 2.0)
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
Expand Down Expand Up @@ -276,12 +278,11 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
agoo
falcon (~> 0.47)
iodine (~> 0.7)
pg (~> 1.5)
pitchfork (~> 0.17)
puma (~> 6.5)
rackup
rails (~> 8.0.0)
redis (~> 5.0)
trilogy (~> 2.8.1)
Expand Down
1 change: 1 addition & 0 deletions frameworks/Ruby/rails/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The tests were run with:
- [Puma 6.4](http://puma.io/)
- [Iodine](https://github.com/boazsegev/iodine)
- [Falcon](https://github.com/socketry/falcon)
- [Pitchfork](https://github.com/Shopify/pitchfork)
- [MySQL](https://dev.mysql.com/)
- [PostgreSQL](https://www.postgresql.org/)
- [Redis 6](https://redis.io)
Expand Down
8 changes: 4 additions & 4 deletions frameworks/Ruby/rails/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"notes": "",
"versus": "rack-iodine-mri-sequel-raw"
},
"agoo": {
"pitchfork": {
"db_url": "/db",
"json_url": "/json",
"query_url": "/queries?queries=",
Expand All @@ -107,12 +107,12 @@
"language": "Ruby",
"orm": "Full",
"platform": "Rack",
"webserver": "Agoo",
"webserver": "Pitchfork",
"os": "Linux",
"database_os": "Linux",
"display_name": "rails-agoo",
"display_name": "rails-pitchfork",
"notes": "",
"versus": ""
"versus": "rack-pitchfork-mri-sequel-raw"
}
}]
}
7 changes: 7 additions & 0 deletions frameworks/Ruby/rails/config/pitchfork.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require_relative 'auto_tune'

num_workers, = auto_tune

worker_processes num_workers
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITH=postgresql:agoo
ENV BUNDLE_WITH=postgresql:pitchfork
RUN bundle install --jobs=8

COPY . /rails/
Expand All @@ -24,4 +24,4 @@ ENV RAILS_ENV=production_postgresql
ENV PORT=8080
ENV REDIS_URL=redis://localhost:6379/0
CMD service redis-server start && \
RACK_ENV=production bundle exec rackup -r agoo -s agoo -p 8080 -q -O workers=$(ruby config/auto_tune.rb | grep -Eo '[0-9]+' | head -n 1)
RACK_ENV=production bundle exec pitchfork -c config/pitchfork.rb
Loading