- Median time from merge request creation until the merge request is merged
(closed merge requests won't be taken into account)
- **Staging** (Continuous Deployment)
- Median time from when the merge request got merged until the deploy to
production (production is last stage/environment)
- **Production** (Total)
- Sum of all the above stages excluding the Test (CI) time
## How the data is measured
Cycle Analytics records cycle time so only data on the issues that have been
deployed to production are measured. In case you just started a new project and
you have not pushed anything to production, then you will not be able to
properly see the Cycle Analytics of your project.
Specifically, if your CI is not set up and you have not defined a `production`
[environment], then you will not have any data.
Below you can see in more detail what the various stages of Cycle Analytics mean.
| **Stage** | **Description** |
| --------- | --------------- |
| Issue | Measures the median time between creating an issue and taking action to solve it, by either labeling it or adding it to a milestone, whatever comes first. The label will be tracked only if it already has an [Issue Board list][board] created for it. |
| Plan | Measures the median time between the action you took for the previous stage, and pushing the first commit to the branch. The very first commit is the one that triggers the separation between **Plan** and **Code** and at least one commit needs to contain the [issue closing pattern] in order to know what branch and commit is related to the issue (for example, `Closes #xxx`, where `xxx` is the number of the issue related to this commit). The closing pattern doesn't necessarily need to be in the first commit message. If there is no commit containing the issue closing pattern, it is not considered to the measurement time of the stage. |
| Code | Measures the median time between pushing a first commit (previous stage) and creating a merge request related to that commit. The key to keep the process tracked is include the [issue closing pattern] to the description of the merge request. |
| Test | Measures the median time to run the entire pipeline for that project. It's related to the time GitLab CI takes to run every job for the commits pushed to that merge request defined in the previous stage. It is basically the start->finish time for all pipelines. `master` is not excluded. It does not attempt to track time for any particular stages. |
| Review | Measures the median time taken to review the merge request, between its creation and until it's merged. |
| Staging | Measures the median time between merging the merge request until the very first deployment to production. It's tracked by the [environment] set to `production` in your GitLab CI configuration. If there isn't a `production` environment, this is not tracked. |
[idea to production]: https://about.gitlab.com/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab