mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add latency output
This commit is contained in:
parent
f07d8c0ac1
commit
bd4c5a2879
2 changed files with 17 additions and 7 deletions
13
README.md
13
README.md
|
@ -16,15 +16,18 @@ Rails to make background processing dead simple.
|
|||
Performance
|
||||
---------------
|
||||
|
||||
Version | Latency | Garbage created for 10,000 jobs | Time to process 100,000 jobs | Throughput
|
||||
Version | Latency | Garbage created for 10,000 jobs | Time to process 100,000 jobs | Throughput | Ruby
|
||||
-----------------|------|---------|---------|------------------------
|
||||
Sidekiq 4.0.0 | 10ms | 151 MB | 22 sec | **4500 jobs/sec**
|
||||
Sidekiq 3.5.1 | 22ms | 1257 MB | 125 sec | 800 jobs/sec
|
||||
Resque 1.25.2 | - | - | 420 sec | 240 jobs/sec
|
||||
DelayedJob 4.1.1 | - | - | 465 sec | 215 jobs/sec
|
||||
Sidekiq 6.0.0 | 3 ms | 156 MB | 19 sec | **5200 jobs/sec** | MRI 2.6.3
|
||||
Sidekiq 4.0.0 | 10 ms | 151 MB | 22 sec | **4500 jobs/sec** |
|
||||
Sidekiq 3.5.1 | 22 ms | 1257 MB | 125 sec | 800 jobs/sec |
|
||||
Resque 1.25.2 | - | - | 420 sec | 240 jobs/sec |
|
||||
DelayedJob 4.1.1 | - | - | 465 sec | 215 jobs/sec |
|
||||
|
||||
<small>This benchmark can be found in `bin/sidekiqload`.</small>
|
||||
|
||||
Benchmarks assume a Redis network latency of 1ms.
|
||||
|
||||
Requirements
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ class LoadWorker
|
|||
1
|
||||
end
|
||||
|
||||
def perform(idx)
|
||||
def perform(idx, ts=nil)
|
||||
puts(Time.now.to_f - ts) if ts != nil
|
||||
#raise idx.to_s if idx % 100 == 1
|
||||
end
|
||||
end
|
||||
|
@ -111,7 +112,13 @@ Monitoring = Thread.new do
|
|||
total = qsize
|
||||
Sidekiq.logger.error("RSS: #{Process.rss} Pending: #{total}")
|
||||
if total == 0
|
||||
Sidekiq.logger.error("Done")
|
||||
Sidekiq.logger.error("Done, now here's the latency for three jobs")
|
||||
|
||||
LoadWorker.perform_async(1, Time.now.to_f)
|
||||
LoadWorker.perform_async(2, Time.now.to_f)
|
||||
LoadWorker.perform_async(3, Time.now.to_f)
|
||||
|
||||
sleep 0.2
|
||||
exit(0)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue