Use new project level VSA backend behind a FF
The project level VSA page still uses the old "cycle analytics" backend which has some performance issues:
- Several N+1 queries.
- Joins many unnecessary relations.
- Uses a custom median calculation implementation, instead of the standard postgres median function.
The Group level VSA backend was build in a way that it could be used on the project level. This issue aims to keep the frontend untouched and implement an adapter API which transforms the results from the new backend into the old API format.
Old API calls for the project level VSA:
- Top counts and stage medians: https://gitlab.com/gitlab-org/gitlab/-/value_stream_analytics?cycle_analytics[start_date]=30
- Records (right side): https://gitlab.com/gitlab-org/gitlab/-/value_stream_analytics/events/issue.json?cycle_analytics[start_date]=30
Wins:
- Performance improvements on project VSA page.
- Eliminate a lot's of old code and their test cases.
- Same query means project level and group level figures can be "compared".
Edited by Adam Hegyi