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
7 changes: 3 additions & 4 deletions frameworks/Ruby/grape/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ source 'https://rubygems.org'

gem 'mysql2', '0.5.6'
gem 'unicorn', '6.1.0'
gem 'puma', '~> 6.4'
gem 'activerecord', '~> 7.1.0', :require => 'active_record'
gem 'puma', '~> 6.5'
gem 'activerecord', '~> 8.0.0', :require => 'active_record'
gem 'grape', '2.1.1'
gem 'multi_json', require: 'multi_json'
gem 'oj', '~> 3.16'
gem 'json', '~> 2.9'
6 changes: 3 additions & 3 deletions frameworks/Ruby/grape/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ module Acme
end

get '/db' do
ActiveRecord::Base.connection_pool.with_connection do
ActiveRecord::Base.with_connection do
World.find(rand1).attributes
end
end

get '/query' do
ActiveRecord::Base.connection_pool.with_connection do
ActiveRecord::Base.with_connection do
ALL_IDS.sample(bounded_queries).map do |id|
World.find(id)
end
Expand All @@ -63,7 +63,7 @@ module Acme

get '/updates' do
worlds =
ActiveRecord::Base.connection_pool.with_connection do
ActiveRecord::Base.with_connection do
ALL_IDS.sample(bounded_queries).map do |id|
world = World.find(id)
new_value = rand1
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Ruby/grape/config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ production:
database: hello_world
username: benchmarkdbuser
password: benchmarkdbpass
pool: 2
pool: 3
timeout: 5000
2 changes: 1 addition & 1 deletion frameworks/Ruby/grape/config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

workers num_workers

threads 2, 2
threads 3, 3

# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
Expand Down
Loading