diff --git a/frameworks/Ruby/grape/Gemfile b/frameworks/Ruby/grape/Gemfile index 1aea70fade0..b1e9fe3b4d5 100644 --- a/frameworks/Ruby/grape/Gemfile +++ b/frameworks/Ruby/grape/Gemfile @@ -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' diff --git a/frameworks/Ruby/grape/config.ru b/frameworks/Ruby/grape/config.ru index a91b5364a11..334605c20c4 100644 --- a/frameworks/Ruby/grape/config.ru +++ b/frameworks/Ruby/grape/config.ru @@ -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 @@ -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 diff --git a/frameworks/Ruby/grape/config/database.yml b/frameworks/Ruby/grape/config/database.yml index 40b271b409a..9be8d7d851a 100644 --- a/frameworks/Ruby/grape/config/database.yml +++ b/frameworks/Ruby/grape/config/database.yml @@ -5,5 +5,5 @@ production: database: hello_world username: benchmarkdbuser password: benchmarkdbpass - pool: 2 + pool: 3 timeout: 5000 diff --git a/frameworks/Ruby/grape/config/puma.rb b/frameworks/Ruby/grape/config/puma.rb index b187587b799..1ac05407d4a 100644 --- a/frameworks/Ruby/grape/config/puma.rb +++ b/frameworks/Ruby/grape/config/puma.rb @@ -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