1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Cleanups for sidekiqload (#5136)

* Simplify the argument creation in sidekiqload

* The toxiproxy gem is part of the Gemfile :load_test group

* No need to mention it to install manually.

Co-authored-by: Mike Perham <mperham@gmail.com>
This commit is contained in:
Benoit Daloze 2022-02-07 21:34:05 +01:00 committed by GitHub
parent 00ae6a7423
commit e59f1e5d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,6 @@ end
# brew tap shopify/shopify
# brew install toxiproxy
# gem install toxiproxy
# run `toxiproxy-server` in a separate terminal window.
require "toxiproxy"
# simulate a non-localhost network for realer-world conditions.
@ -90,12 +89,7 @@ iter = 50
count = 10_000
iter.times do
arr = Array.new(count) do
[]
end
count.times do |idx|
arr[idx][0] = idx
end
arr = Array.new(count) { |idx| [idx] }
Sidekiq::Client.push_bulk("class" => LoadWorker, "args" => arr)
end
Sidekiq.logger.error "Created #{count * iter} jobs"