Automatically create issue if a spec took significantly longer than expected
Goal
Create an issue automatically after a job finishes (pass or fail), if:
- a spec file took 50% longer than what Knapsack expected AND
- contributed to 15%+ of the total job duration AND
- the job is close to time out - took more than 70 minutes
Note that all conditions need to be true, because we don't yet care if a test was expected to take 1 second but finished in 2 seconds - it's 100% increase but it is not a bottleneck.
This automation will also help with Create process to troubleshoot Knapsack scheduling (#301 - closed)
Technical note
Use https://gitlab.com/gitlab-org/ruby/gems/gitlab_quality-test_tooling is recommended.
This is the 2nd iteration for Proposal: Introduce a "job duration analysis" s... (#323 - closed).