[WHIT-3127] Add rake task to get sidekiq stats#11205
[WHIT-3127] Add rake task to get sidekiq stats#11205lauraghiorghisor-tw merged 1 commit intomainfrom
Conversation
9a2f0d2 to
be4d9e7
Compare
|
|
||
| puts "\nTotal Jobs Across All Sets" | ||
| puts "--------------------------" | ||
| puts "Enqueued (All Queues): #{total_enqueued}" |
There was a problem hiding this comment.
Would it be worth also giving this a breakdown by class as well?
There was a problem hiding this comment.
Not sure what you mean here, the breakdown by class is below.
There was a problem hiding this comment.
Are there enqueued jobs that make up the total other than scheduled, retried, dead? Just wondering if its worth seeing those as well.
There was a problem hiding this comment.
Hmmm
whitehall(prod):353> Sidekiq::Stats.new
=>
#<Sidekiq::Stats:0x0000ffff68ff7860
@stats=
{:processed=>xxxx,
:failed=>xxxxx,
:scheduled_size=>xxxx,
:retry_size=>xxx,
:dead_size=>xxxx,
:processes_size=>xxx,
:default_queue_latency=>xxx}>
Only failed and processed, which I don't think we care about too much. Nonetheless it got me thinking what enqueued means, and, TIL, enqueued is a separate stat in sidekiq, reading the actual queues, and that's different from the retry and schedule set. The difference is between calling perform_async (goes to queue) vs perform_at (go to scheduled set). I think it's useful to see a breakdown of the active enqueued jobs per queue so I added that too.
be4d9e7 to
a5b891f
Compare
3117818 to
ac6e98c
Compare
This is to be used for future work on removing some aliased workers, but it is a handy task to have in general.
ac6e98c to
63e7900
Compare
This is to be used for future work on removing some aliased workers, but it is a handy task to have in general.
Jira