Create Doc Reference for pipeline quota minutes are calculated
### Problem to solve I am unable to find any doc reference on how we calculate pipeline minutes which are charged to a group's pipeline quota. The doc for [how pipeline duration is calculated](https://docs.gitlab.com/ee/ci/pipelines.html#how-pipeline-duration-is-calculated) explains how pipeline duration is calculated. But it doesn’t mention how cost is calculated. ### Further details In [this doc](https://docs.gitlab.com/ee/ci/pipelines.html#how-pipeline-duration-is-calculated), the example results in a total pipeline minutes use of `4` minutes. However, the amount the user would be charged for in their group's pipeline quota is `8`. See below ... ## How pipeline duration is calculated A simple example is: A (1, 3) B (2, 4) C (6, 7) In the example: A begins at 1 and ends at 3. B begins at 2 and ends at 4. C begins at 6 and ends at 7. Visually, it can be viewed as: ``` 0 1 2 3 4 5 6 7 AAAAAAA BBBBBBB CCCC ``` The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is: ``` (4 - 1) + (7 - 6) => 4 ``` ## How we charge for pipeline minutes in the group's pipeline quota The sum of each individual job is being calculated. ``` A + B + C = 3 + 3 + 2 => 8 ``` ### Proposal Add a section to [this doc](https://docs.gitlab.com/ee/ci/pipelines.html#how-pipeline-duration-is-calculated) which explains how the pipeline quota minutes are calculated. ### Other links/references - Customer ticket: https://gitlab.zendesk.com/agent/tickets/126177 - Slack convo with #g-verify team: https://gitlab.slack.com/archives/C0SFP840G/p1563230676384800 - MR loosely referencing the calculation: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7828#note_19470782
issue