File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ source 'https://rubygems.org'
2
2
3
3
gem 'mysql2' , '0.5.6'
4
4
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'
7
7
gem 'grape' , '2.1.1'
8
- gem 'multi_json' , require : 'multi_json'
9
- gem 'oj' , '~> 3.16'
8
+ gem 'json' , '~> 2.9'
Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ module Acme
48
48
end
49
49
50
50
get '/db' do
51
- ActiveRecord ::Base . connection_pool . with_connection do
51
+ ActiveRecord ::Base . with_connection do
52
52
World . find ( rand1 ) . attributes
53
53
end
54
54
end
55
55
56
56
get '/query' do
57
- ActiveRecord ::Base . connection_pool . with_connection do
57
+ ActiveRecord ::Base . with_connection do
58
58
ALL_IDS . sample ( bounded_queries ) . map do |id |
59
59
World . find ( id )
60
60
end
@@ -63,7 +63,7 @@ module Acme
63
63
64
64
get '/updates' do
65
65
worlds =
66
- ActiveRecord ::Base . connection_pool . with_connection do
66
+ ActiveRecord ::Base . with_connection do
67
67
ALL_IDS . sample ( bounded_queries ) . map do |id |
68
68
world = World . find ( id )
69
69
new_value = rand1
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ production:
5
5
database : hello_world
6
6
username : benchmarkdbuser
7
7
password : benchmarkdbpass
8
- pool : 2
8
+ pool : 3
9
9
timeout : 5000
Original file line number Diff line number Diff line change 5
5
6
6
workers num_workers
7
7
8
- threads 2 , 2
8
+ threads 3 , 3
9
9
10
10
# Use the `preload_app!` method when specifying a `workers` number.
11
11
# This directive tells Puma to first boot the application and load code
You can’t perform that action at this time.
0 commit comments