`setup` is too late; by then, some unwanted log output will already have
been written to stdout. `before_setup` runs early enough to suppress it
(since it is `ActiveSupport::Testing::TaggedLogging#before_setup` which
writes the undesired log output at log level `info`).
* standardrb
* Rename all `*_worker` references to `*_job`
* Rename Worker references to Job in test suite
* Rename ApiJob to ApiAjJob to avoid collisions
* Rename remaining Worker to Job references
* Rename WorkController to JobController
Including routes
* fixup! Rename WorkController to JobController
We should not memoize the value of `scaled_poll_interval` because this
changes based on the number of Sidekiq processes
Co-authored-by: Heinrich Lee Yu <heinrich@gitlab.com>
* Initial work on Sidekiq::Config
* Initial work on Sidekiq::Config
* reduce dependencies in deploy marks
* bare sidekiq and webapp
* Modify runtime to work with Capsules
* Cleanup
* Rename test files to remove test_ prefix
* Update test suite and standard rules to be more compliant
* Move constant definition outside code, per standard formatting
* Loads of changes for introduction of Capsules
* Remove Redis adapter abstraction
* update capsule overview
* Ensure Sidekiq.redis uses the correct pool for jobs running within a Capsule
* Use default_capsule for safety
* Slow down the beat to halve its Redis overhead
* move config fixtures into cfg/
* Add capsule middleware test
* use accessor
* Refactor job query
* First attempt at a histogram chart
* Explore a box plot chart
* Show 3 chart variations
* Outline boxes instead of solid boxes
* Remove box plot chart
* Use linear y-axis
This matches the axis for the metrics overview page, and it clarifies the data.
* Data tables for job metrics
* Add histogram totals chart
* Move things around
* Tooltip for histogram chart
* Fix deploy tooltip
* Extract marks query
* Extract chart base class
* Renaming
* Ensure a min radius for histogram bubbles
High job counts can result in a very small multiplier, which was making some of the bubbles too small to be visible.
* Round everything to two decimals for consistency
* styling for metrics headers
* Show emdash when timing info is n/a
* No job results found message
* No need for metrics header
* Add multi-line chart for total execution time by job
* Fiddling with the UX
* Refactor metrics `top_jobs` query
* debugging
* revert debugging
* revert debugging
* Add failed and avg time, just one data table
* Add color swatch in data table
* Measure in seconds
* Fix duplicate color
* standard style
* Rename for clarity
* Bring back empty metrics test
* Execution time is not consistent, assert processed counts instead
* Only include top 5 in chart, change swatch element to checkbox
* Wire up the checkboxes to show/hide each job class on the chart
* The checkboxes should not appear disabled
* Ensure seconds for y-axis to match table and UX improvements
- All data shown on metrics page is now in seconds
- Tooltip now includes "UTC" with the time
- Tooltip rounds the number of seconds and includes "seconds"
* Show deploy marks in metrics chart
* Fix annotation position when updating datasets
* Remove deploy labels on chart
We shouldn't assume the first word of the label is the git SHA, and the label annotations were hacky anyway.
* tweaks
Co-authored-by: Mike Perham <mperham@gmail.com>
* Add coverage for helpers.rb
* Add simplecov to git actions
* Test simplecov
* Changed this to run on all pull requests, not just main and 7-0
* Fix yaml spacing
* Create simplecov file and pointer for file
* Add empty hash to json file
* See if we need simplecov gem enabled
* Update coverage file
* Add in covered_percent
* Move simplecov_file out
* Remove token
* Add token back in
* Remove unnecessary code
* Add comment for running simplecov in the rake file
* Fix typo in spec file
* Remove references to codecov, add minimum requirement of 90% to simplecov
* 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
* Sort processes in UI using natural sort order
* Rename variable for consistency
* Fix natural sort algorithm and add more test examples
* Don't sort processes unless all process have a hostname
* Object#present? is a Rails method, not a Ruby method
* Flush Redis database before each helper test