Slow tests management
## Summary Running the backend test suite takes a long time. `rspec system` and `rspec-ee system` jobs are taking around 50 minutes and have become the critical path. ## Proposal ### Reduce Pipeline Time Spent in Backend Specs 1. Work on reducing the time it takes to run the tests https://gitlab.com/groups/gitlab-org/-/epics/8745+ ### Improve feedback on test duration in MRs for engineers 1. Publish as artifacts the rspec profile stats for each MR and for master branch 1. Use the master branch artifacts to compare the data 1. Add a comment in the MR where we add the rspec profile stats for the tests related to the MR changes, from the artifacts. ### Define acceptable thresholds and guidelines for test performance #### Define acceptable thresholds Use [/rspec_profiling_stats](https://gitlab.com/gitlab-org/rspec_profiling_stats) to determine a threshold. We can start with the average number of the top 1000 slow tests per file * Option 1: Using top 50 slow tests from rspec_profiling_stats - Average time for top 50 slow spec files: 577.0309535077 - Average time for top 50 slow individual tests: 79.41184718272001 * Option 2: Using top 100 slow tests from rspec_profiling_stats - Average time for top 100 slow spec files: 436.8886234845 - Average time for top 100 slow individual tests: 57.988284491980004 * Option 3: Using top 1000 slow tests from rspec_profiling_stats - Average per spec file for top 1000 spec files: 122.27346895079121 seconds - Number of spec files taking longer than average: 281 - Average per spec for top 1000 specs: 20.0866282358012 seconds - Number of individual tests taking longer than average: 230 #### Build a system to automatically quarantine slow tests, existing threshold after 60 days. #### Automatically determine the group owning the related features.
epic