Skip to content

Commit d4acac6

Browse files
authored
[ruby/grape] Update dependencies (#9689)
Also increase the connection pool to 3 (similar to Rails). +-------------------------+---------+------+-----+-----+-----+--------------+ | branch_name|plaintext|update| json| db|query|weighted_score| +-------------------------+---------+------+-----+-----+-----+--------------+ | master| 19841| 10008|57534|25783|13696| 1087| |grape/update-dependencies| 22286| 10680|58089|28088|17152| 1213| +-------------------------+---------+------+-----+-----+-----+--------------+
1 parent a88f978 commit d4acac6

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

frameworks/Ruby/grape/Gemfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ source 'https://rubygems.org'
22

33
gem 'mysql2', '0.5.6'
44
gem 'unicorn', '6.1.0'
5-
gem 'puma', '~> 6.4'
6-
gem 'activerecord', '~> 7.1.0', :require => 'active_record'
5+
gem 'puma', '~> 6.5'
6+
gem 'activerecord', '~> 8.0.0', :require => 'active_record'
77
gem 'grape', '2.1.1'
8-
gem 'multi_json', require: 'multi_json'
9-
gem 'oj', '~> 3.16'
8+
gem 'json', '~> 2.9'

frameworks/Ruby/grape/config.ru

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ module Acme
4848
end
4949

5050
get '/db' do
51-
ActiveRecord::Base.connection_pool.with_connection do
51+
ActiveRecord::Base.with_connection do
5252
World.find(rand1).attributes
5353
end
5454
end
5555

5656
get '/query' do
57-
ActiveRecord::Base.connection_pool.with_connection do
57+
ActiveRecord::Base.with_connection do
5858
ALL_IDS.sample(bounded_queries).map do |id|
5959
World.find(id)
6060
end
@@ -63,7 +63,7 @@ module Acme
6363

6464
get '/updates' do
6565
worlds =
66-
ActiveRecord::Base.connection_pool.with_connection do
66+
ActiveRecord::Base.with_connection do
6767
ALL_IDS.sample(bounded_queries).map do |id|
6868
world = World.find(id)
6969
new_value = rand1

frameworks/Ruby/grape/config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ production:
55
database: hello_world
66
username: benchmarkdbuser
77
password: benchmarkdbpass
8-
pool: 2
8+
pool: 3
99
timeout: 5000

frameworks/Ruby/grape/config/puma.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
workers num_workers
77

8-
threads 2, 2
8+
threads 3, 3
99

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

0 commit comments

Comments
 (0)