@@ -9,77 +9,146 @@ info: To determine the technical writer assigned to the Stage/Group associated w
...
@@ -9,77 +9,146 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196455) in GitLab 12.9 for groups.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196455) in GitLab 12.9 for groups.
Value stream analytics measures the time spent to go from an
Value stream analytics provides metrics about each stage of your software development process.
[idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab)
(also known as cycle time) for each of your projects or groups. Value stream analytics displays the median time
spent in each stage defined in the process.
Value stream analytics can help you quickly determine the velocity of a given
Use value stream analytics to identify:
group. It points to bottlenecks in the development process, enabling management
to uncover, triage, and identify the root cause of slowdowns in the software development life cycle.
For information on how to contribute to the development of value stream analytics, see our [contributor documentation](../../../development/value_stream_analytics.md).
- The amount of time it takes to go from an idea to production.
- The velocity of a given project.
- Bottlenecks in the development process.
- Factors that cause your software development lifecycle to slow down.
To view value stream analytics for groups:
Value stream analytics is also available for [projects](../../analytics/value_stream_analytics.md).
## View value stream analytics
> - Date range filter [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13216) in GitLab 12.4
> - Filtering [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13216) in GitLab 13.3
You must have at least the Reporter role to view value stream analytics for groups.
To view value stream analytics for your group:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Analytics > Value stream**.
1. On the left sidebar, select **Analytics > Value stream**.
1. To view metrics for each stage, above the **Filter results** text box, select a stage.
1. Optional. Filter the results:
1. Select the **Filter results** text box.
1. Select a parameter.
1. Select a value or enter text to refine the results.
1. To adjust the date range:
- In the **From** field, select a start date.
- In the **To** field, select an end date.
1. Optional. Sort results by ascending or descending:
- To sort by most recent or oldest workflow item, select the **Merge requests** or **Issues**
header. The header name differs based on the stage you select.
- To sort by most or least amount of time spent in each stage, select the **Time** header.
The table shows a list of related workflow items for the selected stage. Based on the stage you select, this can be:
Value stream analytics at the group level includes data for the selected group and its subgroups.
- CI/CD jobs
- Issues
- Merge requests
- Pipelines
NOTE:
A badge next to the workflow items table header shows the number of workflow items that
[Value stream analytics for projects](../../analytics/value_stream_analytics.md) is also available.
completed the selected stage.
## Default stages
## View metrics for each development stage
The stages tracked by value stream analytics by default represent the [GitLab flow](../../../topics/gitlab_flow.md).
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210315) in GitLab 13.0.
These stages can be customized in value stream analytics for groups.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/323982) in GitLab 13.12.
-**Issue** (Tracker)
Value stream analytics shows the median time spent by issues or merge requests in each development stage.
- Time to schedule an issue (by milestone or by adding it to an issue board)
-**Plan** (Board)
- Time to first commit
-**Code** (IDE)
- Time to create a merge request
-**Test** (CI)
- Time it takes GitLab CI/CD to test your code
-**Review** (Merge Request/MR)
- Time spent on code review
-**Staging** (Continuous Deployment)
- Time between merging and deploying to production
## Filter the analytics data
To view the median time spent in each stage by a group:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13216) in GitLab 13.3
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Analytics > Value stream**.
1. Optional. Filter the results:
1. Select the **Filter results** text box.
1. Select a parameter.
1. Select a value or enter text to refine the results.
1. To adjust the date range:
- In the **From** field, select a start date.
- In the **To** field, select an end date.
1. To view the metrics for each stage, above the **Filter results** text box, hover over a stage.
## View the lead time and cycle time for issues
GitLab provides the ability to filter analytics based on the following parameters:
Value stream analytics shows the lead time and cycle time for issues in your groups:
- Milestones (Group level)
- Lead time: Median time from when the issue was created to when it was closed.
- Labels (Group level)
- Cycle time: Median time from first commit to issue closed. Commits are associated with issues when users [cross-link them in the commit message](../../project/issues/crosslinking_issues.md#from-commit-messages).
- Author
- Assignees
To filter results:
To view the lead time and cycle time for issues:
1. Select a group.
1. On the top bar, select **Menu > Groups** and find your group.
1. Click on the filter bar.
1. On the left sidebar, select **Analytics > Value stream**.
1. Select a parameter to filter by.
1. Optional. Filter the results:
1. Select a value from the autocompleted results, or type to refine the results.
1. Select the **Filter results** text box.
1. Select a parameter.
1. Select a value or enter text to refine the results.
1. To adjust the date range:
- In the **From** field, select a start date.
- In the **To** field, select an end date.
![Value stream analytics filter bar](img/vsa_filter_bar_v13_12.png"Active filter bar for value stream analytics")
The **Lead Time** and **Cycle Time** metrics display below the **Filter results** text box.
### Date ranges
## View lead time for changes for merge requests **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13216) in GitLab 12.4.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5.
GitLab provides the ability to filter analytics based on a date range.
Lead time for changes is the median duration between when a merge request is merged and when it's deployed to production.
Data is shown for workflow items created during the selected date range. To filter results:
1. Select a group.
To view the lead time for changes for merge requests in your group:
1. Optionally select a project.
1. Select a date range using the available date pickers.
### Upcoming date filter change
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Analytics > Value stream**.
1. Optional. Filter the results:
1. Select the **Filter results** text box.
1. Select a parameter.
1. Select a value or enter text to refine the results.
1. To adjust the date range:
- In the **From** field, select a start date.
- In the **To** field, select an end date.
The **Lead Time for Changes** metrics display below the **Filter results** text box.
## View number of successful deployments **(PREMIUM)**
> DORA API-based deployment metrics for value stream analytics for groups were [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/337256) from GitLab Ultimate to GitLab Premium in 14.3.
In GitLab 13.9 and later, metrics are calculated based on when the deployment was finished.
In GitLab 13.8 and earlier, metrics are calculated based on when the deployment was created.
## Upcoming date filter change
In the [epics](https://gitlab.com/groups/gitlab-org/-/epics/6046), we plan to alter
In the [epics](https://gitlab.com/groups/gitlab-org/-/epics/6046), we plan to alter
the date filter behavior to filter the end event time of the currently selected stage.
the date filter behavior to filter the end event time of the currently selected stage.
...
@@ -92,82 +161,72 @@ If you were to look at the metrics for the last three months, this issue would n
...
@@ -92,82 +161,72 @@ If you were to look at the metrics for the last three months, this issue would n
the stage metrics. With the new date filter, this item would be included.
the stage metrics. With the new date filter, this item would be included.
DISCLAIMER:
DISCLAIMER:
This page contains information related to upcoming products, features, and functionality.
This section contains information related to upcoming products, features, and functionality.
It is important to note that the information presented is for informational purposes only.
It is important to note that the information presented is for informational purposes only.
Please do not rely on this information for purchasing or planning purposes.
Please do not rely on this information for purchasing or planning purposes.
As with all projects, the items mentioned on this page are subject to change or delay.
As with all projects, the items mentioned on this page are subject to change or delay.
The development, release, and timing of any products, features, or functionality remain at the
The development, release, and timing of any products, features, or functionality remain at the
sole discretion of GitLab Inc.
sole discretion of GitLab Inc.
## How metrics are measured
## How value stream analytics measures stages
> DORA API-based deployment metrics for value stream analytics for groups were [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/337256) from GitLab Ultimate to GitLab Premium in 14.3.
Value stream analytics measures each stage from its start event to its end event.
The "Time" metrics near the top of the page are measured as follows:
-**Lead time**: median time from issue created to issue closed.
-**Cycle time**: median time from first commit to issue closed. (You can associate a commit with an
issue by [crosslinking in the commit message](../../project/issues/crosslinking_issues.md#from-commit-messages).)
-**Lead Time for Changes**: median time between when a merge request is merged and deployed to a
production environment for all merge requests deployed in the given time period.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5.
-**Lead Time for Changes**: median duration between merge request merge and deployment to a production environment for all MRs deployed in the given time period. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5.
The "Recent Activity" metrics near the top of the page are measured as follows:
-**New Issues:** the number of issues created in the date range.
-**Deploys:** the number of deployments to production in the date range.
-**Deployment Frequency:** the average number of deployments to production
per day in the date range.
To see deployment metrics, you must have a [production environment configured](../../../ci/environments/index.md#deployment-tier-of-environments).
NOTE:
For example, a stage might start when a user adds a label to an issue, and ends when they add another label.
In GitLab 13.9 and later, deployment metrics are calculated based on when the deployment was finished.
Items aren't included in the stage time calculation if they have not reached the end event.
In GitLab 13.8 and earlier, deployment metrics are calculated based on when the deployment was created.
You can learn more about these metrics in our [analytics definitions](../../analytics/index.md).
Each stage of value stream analytics is further described in the table below.
![Value stream analytics time metrics](img/vsa_time_metrics_v13_12.png"Time metrics for value stream analytics")
| Stage | Measurement method |
| ------- | -------------------- |
| Issue | The median time between creating an issue and taking action to solve it, by either labeling it or adding it to a milestone, whichever comes first. The label is tracked only if it already has an [issue board list](../../project/issue_board.md) created for it. |
| Plan | The median time between the action you took for the previous stage, and pushing the first commit to the branch. The first commit on the branch triggers the separation between **Plan** and **Code**. At least one of the commits in the branch must contain the related issue number (for example, `#42`). If none of the commits in the branch mention the related issue number, it is not considered in the measurement time of the stage. |
| Code | The median time between pushing a first commit (previous stage) and creating a merge request (MR) related to that commit. The key to keep the process tracked is to include the [issue closing pattern](../../project/issues/managing_issues.md#default-closing-pattern) in the description of the merge request. For example, `Closes #xxx`, where `xxx` is the number of the issue related to this merge request. If the closing pattern is not present, then the calculation uses the creation time of the first commit in the merge request as the start time. |
| Test | The median time to run the entire pipeline for that project. It's related to the time GitLab CI/CD takes to run every job for the commits pushed to that merge request. It is basically the start->finish time for all pipelines. |
| Review | The median time taken to review a merge request that has a closing issue pattern, between its creation and until it's merged. |
| Staging | The median time between merging a merge request that has a closing issue pattern until the very first deployment to a [production environment](#how-value-stream-analytics-identifies-the-production-environment). If there isn't a production environment, this is not tracked. |
## How the stages are measured
## Example workflow
Value stream analytics measures each stage from its start event to its end event.
This example shows a workflow through all seven stages in one day.
For example, a stage might start when one label is added to an issue, and end when another label is added.
Value stream analytics excludes work in progress, meaning it ignores any items that have not reached the end event.
Each stage of value stream analytics is further described in the table below.
If a stage does not include a start and a stop time, its data is not included in the median time.
In this example, milestones have been created and CI/CD for testing and setting environments is configured.
| **Stage** | **Description** |
- 09:00: Create issue. **Issue** stage starts.
| --------- | --------------- |
- 11:00: Add issue to a milestone, start work on the issue, and create a branch locally.
| 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 is tracked only if it already has an [issue board list](../../project/issue_board.md) created for it. |
**Issue** stage stops and **Plan** stage starts.
| 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 of the branch is the one that triggers the separation between **Plan** and **Code**, and at least one of the commits in the branch needs to contain the related issue number (for example, `#42`). If none of the commits in the branch mention the related issue number, it is not considered to the measurement time of the stage. |
- 12:00: Make the first commit.
| Code | Measures the median time between pushing a first commit (previous stage) and creating a merge request (MR) related to that commit. The key to keep the process tracked is to include the [issue closing pattern](../../project/issues/managing_issues.md#closing-issues-automatically) to the description of the merge request (for example, `Closes #xxx`, where `xxx` is the number of the issue related to this merge request). If the closing pattern is not present, then the calculation takes the creation time of the first commit in the merge request as the start time. |
- 12:30: Make the second commit to the branch that mentions the issue number.
| Test | Measures the median time to run the entire pipeline for that project. It's related to the time GitLab CI/CD 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. |
**Plan** stage stops and **Code** stage starts.
| Review | Measures the median time taken to review the merge request that has a closing issue pattern, between its creation and until it's merged. |
- 14:00: Push branch and create a merge request that contains the
| Staging | Measures the median time between merging the merge request with a closing issue pattern until the very first deployment to a [production environment](#how-the-production-environment-is-identified). If there isn't a production environment, this is not tracked. |