I want to check how many logins in seconds are possible with the help of the (own) omniauth provider. I need to find out how these omniauth / oauth requests work, and if this authentication is scalable anyway?
what i got so far:
def performance_auth(user_count=10) bm = Benchmark.realtime do user_count.times do |n| fork do click_on 'Logout' omniauth_config_mock(:provider => "foo", :uid => n, :email => "foo#{n}@example.net") visit "/account/auth/foo/" end end Process.waitall end puts "#{user_count} users Benchmark: #{bm}" bm end
the default is 10 users who authenticate the parallel through the oauth foo provider.
results:
only 2 users can authenticate parallel in 1 sec (is this possible?) 10 users: 5.090777 sec 20 users: 10.471208 sec 50 users: 111.565979 sec ~ 2min!!!!
I really donβt know what I am doing, and if this code is right.
source share