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
29 changes: 25 additions & 4 deletions frameworks/Ruby/rails/Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
source 'https://rubygems.org'

gem 'oj', '~> 3.16'
gem 'pg', '~> 1.5', group: :postgresql
gem 'puma', '~> 6.4', require: false
gem 'falcon', '~> 0.47', require: false
gem 'rails', '~> 7.2.0'
gem 'redis', '~> 5.0'
gem 'trilogy', '~> 2.8.1', group: :mysql
gem 'tzinfo-data'

group :mysql do
gem 'trilogy', '~> 2.8.1'
end

group :postgresql do
gem 'pg', '~> 1.5'
end

group :falcon do
gem 'falcon', '~> 0.47', require: false
end

group :puma do
gem 'puma', '~> 6.4', require: false
end

group :unicorn do
gem 'unicorn', '~> 6.1', require: false
end

group :agoo do
gem 'agoo', require: false
gem 'rackup'
end
9 changes: 9 additions & 0 deletions frameworks/Ruby/rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
agoo (2.15.13)
async (2.17.0)
console (~> 1.26)
fiber-annotation
Expand Down Expand Up @@ -137,6 +138,7 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
kgio (2.11.4)
localhost (1.3.1)
logger (1.6.1)
loofah (2.22.0)
Expand Down Expand Up @@ -232,6 +234,7 @@ GEM
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
raindrops (0.20.1)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
Expand All @@ -254,6 +257,9 @@ GEM
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
useragent (0.16.10)
webrick (1.8.2)
websocket-driver (0.7.6)
Expand All @@ -267,14 +273,17 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
agoo
falcon (~> 0.47)
oj (~> 3.16)
pg (~> 1.5)
puma (~> 6.4)
rackup
rails (~> 7.2.0)
redis (~> 5.0)
trilogy (~> 2.8.1)
tzinfo-data
unicorn (~> 6.1)

BUNDLED WITH
2.3.3
24 changes: 24 additions & 0 deletions frameworks/Ruby/rails/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"plaintext_url": "/plaintext",
"cached_query_url": "/cached?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
Expand All @@ -66,6 +67,29 @@
"display_name": "rails-falcon",
"notes": "",
"versus": "rack-falcon-mri"
},
"agoo": {
"db_url": "/db",
"json_url": "/json",
"query_url": "/queries?queries=",
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"plaintext_url": "/plaintext",
"cached_query_url": "/cached?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
"database": "Postgres",
"framework": "rails",
"language": "Ruby",
"orm": "Full",
"platform": "Rack",
"webserver": "Agoo",
"os": "Linux",
"database_os": "Linux",
"display_name": "rails-agoo",
"notes": "",
"versus": ""
}
}]
}
Empty file.
27 changes: 27 additions & 0 deletions frameworks/Ruby/rails/rails-agoo.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ruby:3.4-rc

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server

EXPOSE 8080
WORKDIR /rails

# ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb

# Use Jemalloc
RUN apt-get update && \
apt-get install -y --no-install-recommends libjemalloc2
ENV LD_PRELOAD=libjemalloc.so.2

COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITHOUT=trilogy
RUN bundle install --jobs=8

COPY . /rails/

ENV RAILS_ENV=production_postgresql
ENV PORT=8080
ENV REDIS_URL=redis://localhost:6379/0
CMD service redis-server start
CMD 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)
Loading