Skip to content

[VSA] Introduce the new duration calculation for label events

Introduce a new way of calculating durations from 2 event timestamps where optionally the events can be array of timestamps. The array-based calculation should work for label based stages.

The change should be behind a feature flag so we can control when we enable the new duration calculation algorithm.

The spike MR contains all the necessary changes but it needs a bit of clean-up, especially in the DataLoaderService.

Tasks (mostly done, we just need to move some code around):

  • Move the DataLoaderService changes from the spike MR with the test cases (refactor if needed).
  • Preserve the enable_vsa_cumulative_label_duration_calculation feature flag.
  • Move the label query changes from ee/lib/gitlab/analytics/cycle_analytics/stage_events/*.
  • Document the behaviour and the feature flag in the user docs.
Edited by Adam Hegyi