* New execution stats data format, #5283
We store time and counts per-queue, per-class and totals, daily.
* break metrics into separate jobs and queues hashes
* tweak
* Move metrics tracking to middleware, start work on Query API
* Add support for labeled points in time
* Add fetch method for deploy marks
* rejigger metrics file layout
* fix tests
* Remove per-queue metrics, adds a lot of complexity with little value IMO
* store per-minute histograms
* Keep basic stats hardwired as is
The idea being that metrics are optional middleware as they have significantly more overhead in CPU time and Redis space.
* Implement top N metrics dashboard
* Add topN and job-specific metric pages
* Supply histogram data to job metrics page
* cant use local time as CI is in a different tz
* Add basic metrics graph, refactor dashboard JS to make Rickshaw reuseable
* prepare for public beta
* Create a timeout that happens before cleanup
* Remove unnecessary code
* Move a redis call into the method that is running redis:
* Add timelock to beginning of cleanup
* Prepare for upcoming Sidekiq::Config redesign
Adjust the server internals to use a config object rather than refering directly to the Sidekiq module.
* Add a compatibility layer for `redis-client`
As discussed in https://github.com/mperham/sidekiq/pull/5253
Switching entirely to redis-client is deemed risky, so instead
we can support both.
All is needed is a small translation layer, and some very minimal
adjustments in the callers.
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Mike Perham <mperham@gmail.com>
* Add keyword arguments handler in Sidekiq::JobRecord#display_args
* Update Sidekiq::JobRecord#display_args kwargs's presence check so that we are not dependent on Rails.
Context: https://github.com/redis/redis-rb/pull/1059
The following is deprecated
```ruby
redis.pipelined do
redis.get(key)
end
```
And should be rewritten as:
```ruby
redis.pipelined do |pipeline|
pipeline.get(key)
end
```
Functionally it makes no difference.
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>