mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Benchmark setup, 56s for 1.9.3, 50s for 2.0.0
This commit is contained in:
parent
73f7112bdb
commit
6289751517
2 changed files with 17 additions and 0 deletions
6
myapp/app/workers/lazy_worker.rb
Normal file
6
myapp/app/workers/lazy_worker.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class LazyWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform
|
||||
end
|
||||
end
|
11
myapp/bench.rb
Normal file
11
myapp/bench.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
require 'sidekiq'
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = { :namespace => 'foo' }
|
||||
end
|
||||
|
||||
jobs = []
|
||||
20_000.times do
|
||||
jobs << []
|
||||
end
|
||||
Sidekiq::Client.push_bulk 'class' => 'LazyWorker', 'args' => jobs
|
Loading…
Add table
Reference in a new issue