diff --git a/docusaurus.config.js b/docusaurus.config.js
index 8b5cb286dab..94b050151be 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -56,18 +56,6 @@ const versions = require('./versions.json');
},
"v0.15":{
banner: 'none',
- },
- "v0.14":{
- banner: 'none',
- },
- "v0.13":{
- banner: 'none',
- },
- "v0.12":{
- banner: 'none',
- },
- "v0.11":{
- banner: 'none',
}
}
},
diff --git a/versioned_docs/version-v0.11/DataModels/DataSupport.md b/versioned_docs/version-v0.11/DataModels/DataSupport.md
deleted file mode 100644
index 6cb180afeaf..00000000000
--- a/versioned_docs/version-v0.11/DataModels/DataSupport.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: "Data Support"
-description: >
- Data sources that DevLake supports
-sidebar_position: 1
----
-
-
-## Data Sources and Data Plugins
-DevLake supports the following data sources. The data from each data source is collected with one or more plugins. There are 9 data plugins in total: `ae`, `feishu`, `gitextractor`, `github`, `gitlab`, `jenkins`, `jira`, `refdiff` and `tapd`.
-
-
-| Data Source | Versions | Plugins |
-|-------------|--------------------------------------|-------- |
-| AE | | `ae` |
-| Feishu | Cloud |`feishu` |
-| GitHub | Cloud |`github`, `gitextractor`, `refdiff` |
-| GitLab | Cloud, Community Edition 13.x+ |`gitlab`, `gitextractor`, `refdiff` |
-| Jenkins | 2.263.x+ |`jenkins` |
-| Jira | Cloud, Server 8.x+, Data Center 8.x+ |`jira` |
-| TAPD | Cloud | `tapd` |
-
-
-
-## Data Collection Scope By Each Plugin
-This table shows the entities collected by each plugin. Domain layer entities in this table are consistent with the entities [here](./DevLakeDomainLayerSchema.md).
-
-| Domain Layer Entities | ae | gitextractor | github | gitlab | jenkins | jira | refdiff | tapd |
-| --------------------- | -------------- | ------------ | -------------- | ------- | ------- | ------- | ------- | ------- |
-| commits | update commits | default | not-by-default | default | | | | |
-| commit_parents | | default | | | | | | |
-| commit_files | | default | | | | | | |
-| pull_requests | | | default | default | | | | |
-| pull_request_commits | | | default | default | | | | |
-| pull_request_comments | | | default | default | | | | |
-| pull_request_labels | | | default | | | | | |
-| refs | | default | | | | | | |
-| refs_commits_diffs | | | | | | | default | |
-| refs_issues_diffs | | | | | | | default | |
-| ref_pr_cherry_picks | | | | | | | default | |
-| repos | | | default | default | | | | |
-| repo_commits | | default | default | | | | | |
-| board_repos | | | | | | | | |
-| issue_commits | | | | | | | | |
-| issue_repo_commits | | | | | | | | |
-| pull_request_issues | | | | | | | | |
-| refs_issues_diffs | | | | | | | | |
-| boards | | | default | | | default | | default |
-| board_issues | | | default | | | default | | default |
-| issue_changelogs | | | | | | default | | default |
-| issues | | | default | | | default | | default |
-| issue_comments | | | | | | default | | default |
-| issue_labels | | | default | | | | | |
-| sprints | | | | | | default | | default |
-| issue_worklogs | | | | | | default | | default |
-| users o | | | default | | | default | | default |
-| builds | | | | | default | | | |
-| jobs | | | | | default | | | |
-
diff --git a/versioned_docs/version-v0.11/DataModels/DevLakeDomainLayerSchema.md b/versioned_docs/version-v0.11/DataModels/DevLakeDomainLayerSchema.md
deleted file mode 100644
index 30fc5d6a4e7..00000000000
--- a/versioned_docs/version-v0.11/DataModels/DevLakeDomainLayerSchema.md
+++ /dev/null
@@ -1,532 +0,0 @@
----
-title: "Domain Layer Schema"
-description: >
- DevLake Domain Layer Schema
-sidebar_position: 2
----
-
-## Summary
-
-This document describes the entities in DevLake's domain layer schema and their relationships.
-
-Data in the domain layer is transformed from the data in the tool layer. The tool layer schema is based on the data from specific tools such as Jira, GitHub, Gitlab, Jenkins, etc. The domain layer schema can be regarded as an abstraction of tool-layer schemas.
-
-Domain layer schema itself includes 2 logical layers: a `DWD` layer and a `DWM` layer. The DWD layer stores the detailed data points, while the DWM is the slight aggregation and operation of DWD to store more organized details or middle-level metrics.
-
-
-## Use Cases
-1. Users can make customized Grafana dashboards based on the domain layer schema.
-2. Contributors can complete the ETL logic when adding new data source plugins refering to this data model.
-
-
-## Data Model
-
-This is the up-to-date domain layer schema for DevLake v0.10.x. Tables (entities) are categorized into 5 domains.
-1. Issue tracking domain entities: Jira issues, GitHub issues, GitLab issues, etc
-2. Source code management domain entities: Git/GitHub/Gitlab commits and refs, etc
-3. Code review domain entities: GitHub PRs, Gitlab MRs, etc
-4. CI/CD domain entities: Jenkins jobs & builds, etc
-5. Cross-domain entities: entities that map entities from different domains to break data isolation
-
-
-### Schema Diagram
-![Domain Layer Schema](/img/DomainLayerSchema/schema-diagram-v0.14.png)
-
-When reading the schema, you'll notice that many tables' primary key is called `id`. Unlike auto-increment id or UUID, `id` is a string composed of several parts to uniquely identify similar entities (e.g. repo) from different platforms (e.g. Github/Gitlab) and allow them to co-exist in a single table.
-
-Tables that end with WIP are still under development.
-
-
-### Naming Conventions
-
-1. The name of a table is in plural form. Eg. boards, issues, etc.
-2. The name of a table which describe the relation between 2 entities is in the form of [BigEntity in singular form]\_[SmallEntity in plural form]. Eg. board_issues, sprint_issues, pull_request_comments, etc.
-3. Value of the field in enum type are in capital letters. Eg. [table.issues.type](https://merico.feishu.cn/docs/doccnvyuG9YpVc6lvmWkmmbZtUc#ZDCw9k) has 3 values, REQUIREMENT, BUG, INCIDENT. Values that are phrases, such as 'IN_PROGRESS' of [table.issues.status](https://merico.feishu.cn/docs/doccnvyuG9YpVc6lvmWkmmbZtUc#ZDCw9k), are separated with underscore '\_'.
-
-
-
-## DWD Entities - (Data Warehouse Detail)
-
-### Domain 1 - Issue Tracking
-
-#### 1. Issues
-
-An `issue` is the abstraction of Jira/Github/GitLab/TAPD/... issues.
-
-| **field** | **type** | **length** | **description** | **key** |
-| :-------------------------- | :------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
-| `id` | varchar | 255 | An issue's `id` is composed of < plugin >:< Entity >:< PK0 >[:PK1]..."
Category | -Metric Name | -Definition | -Data Required | -Use Scenarios and Recommended Practices | -Value | -
---|---|---|---|---|---|
Delivery Velocity | -Requirement Count | -Number of issues in type "Requirement" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process.
- 2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. - 3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. - 4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. |
- 1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources.
- 2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. |
-
Requirement Delivery Rate | -Ratio of delivered requirements to all requirements | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -|||
Requirement Lead Time | -Lead time of issues with type "Requirement" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the trend of requirement lead time to observe if it has improved over time.
- 2. Analyze and compare the requirement lead time of each project/team to identify key projects with abnormal lead time. - 3. Drill down to analyze a requirement's staying time in different phases of SDLC. Analyze the bottleneck of delivery velocity and improve the workflow. |
- 1. Analyze key projects and critical points, identify good/to-be-improved practices that affect requirement lead time, and reduce the risk of delays
- 2. Focus on the end-to-end velocity of value delivery process; coordinate different parts of R&D to avoid efficiency shafts; make targeted improvements to bottlenecks. |
- |
Requirement Granularity | -Number of story points associated with an issue | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the story points/requirement lead time of requirements to evaluate whether the ticket size, ie. requirement complexity is optimal.
- 2. Compare the estimated requirement granularity with the actual situation and evaluate whether the difference is reasonable by combining more microscopic workload metrics (e.g. lines of code/code equivalents) |
- 1. Promote product teams to split requirements carefully, improve requirements quality, help developers understand requirements clearly, deliver efficiently and with high quality, and improve the project management capability of the team.
- 2. Establish a data-supported workload estimation model to help R&D teams calibrate their estimation methods and more accurately assess the granularity of requirements, which is useful to achieve better issue planning in project management. |
- |
Commit Count | -Number of Commits | -Source Code Management entities: Git/GitHub/GitLab commits | -
-1. Identify the main reasons for the unusual number of commits and the possible impact on the number of commits through comparison
- 2. Evaluate whether the number of commits is reasonable in conjunction with more microscopic workload metrics (e.g. lines of code/code equivalents) |
- 1. Identify potential bottlenecks that may affect output
- 2. Encourage R&D practices of small step submissions and develop excellent coding habits |
- |
Added Lines of Code | -Accumulated number of added lines of code | -Source Code Management entities: Git/GitHub/GitLab commits | -
-1. From the project/team dimension, observe the accumulated change in Added lines to assess the team activity and code growth rate
- 2. From version cycle dimension, observe the active time distribution of code changes, and evaluate the effectiveness of project development model. - 3. From the member dimension, observe the trend and stability of code output of each member, and identify the key points that affect code output by comparison. |
- 1. identify potential bottlenecks that may affect the output
- 2. Encourage the team to implement a development model that matches the business requirements; develop excellent coding habits |
- |
Deleted Lines of Code | -Accumulated number of deleted lines of code | -Source Code Management entities: Git/GitHub/GitLab commits | -|||
Pull Request Review Time | -Time from Pull/Merge created time until merged | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | --1. Observe the mean and distribution of code review time from the project/team/individual dimension to assess the rationality of the review time | -1. Take inventory of project/team code review resources to avoid lack of resources and backlog of review sessions, resulting in long waiting time
- 2. Encourage teams to implement an efficient and responsive code review mechanism |
- |
Bug Age | -Lead time of issues in type "Bug" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Observe the trend of bug age and locate the key reasons. -2. According to the severity level, type (business, functional classification), affected module, source of bugs, count and observe the length of bug and incident age. |
- 1. Help the team to establish an effective hierarchical response mechanism for bugs and incidents. Focus on the resolution of important problems in the backlog. -2. Improve team's and individual's bug/incident fixing efficiency. Identify good/to-be-improved practices that affect bug age or incident age |
- |
Incident Age | -Lead time of issues in type "Incident" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -|||
Delivery Quality | -Pull Request Count | -Number of Pull/Merge Requests | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -
-1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. |
- 1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation |
-
Pull Request Pass Rate | -Ratio of Pull/Merge Review requests to merged | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Pull Request Review Rounds | -Number of cycles of commits followed by comments/final merge | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Pull Request Review Count | -Number of Pull/Merge Reviewers | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -1. As a secondary indicator, assess the cost of labor invested in the code review process | -1. Take inventory of project/team code review resources to avoid long waits for review sessions due to insufficient resource input | -|
Bug Count | -Number of bugs found during testing | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. From the project or team dimension, observe the statistics on the total number of defects, the distribution of the number of defects in each severity level/type/owner, the cumulative trend of defects, and the change trend of the defect rate in thousands of lines, etc. -2. From version cycle dimension, observe the statistics on the cumulative trend of the number of defects/defect rate, which can be used to determine whether the growth rate of defects is slowing down, showing a flat convergence trend, and is an important reference for judging the stability of software version quality -3. From the time dimension, analyze the trend of the number of test defects, defect rate to locate the key items/key points -4. Evaluate whether the software quality and test plan are reasonable by referring to CMMI standard values |
- 1. Defect drill-down analysis to inform the development of design and code review strategies and to improve the internal QA process -2. Assist teams to locate projects/modules with higher defect severity and density, and clean up technical debts -3. Analyze critical points, identify good/to-be-improved practices that affect defect count or defect rate, to reduce the amount of future defects |
- |
Incident Count | -Number of Incidents found after shipping | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Bugs Count per 1k Lines of Code | -Amount of bugs per 1,000 lines of code | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Incidents Count per 1k Lines of Code | -Amount of incidents per 1,000 lines of code | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Delivery Cost | -Commit Author Count | -Number of Contributors who have committed code | -Source Code Management entities: Git/GitHub/GitLab commits | -1. As a secondary indicator, this helps assess the labor cost of participating in coding | -1. Take inventory of project/team R&D resource inputs, assess input-output ratio, and rationalize resource deployment | -
Delivery Capability | -Build Count | -The number of builds started | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -1. From the project dimension, compare the number of builds and success rate by combining the project phase and the complexity of tasks -2. From the time dimension, analyze the trend of the number of builds and success rate to see if it has improved over time |
- 1. As a process indicator, it reflects the value flow efficiency of upstream production and research links -2. Identify excellent/to-be-improved practices that impact the build, and drive the team to precipitate reusable tools and mechanisms to build infrastructure for fast and high-frequency delivery |
-
Build Duration | -The duration of successful builds | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -|||
Build Success Rate | -The percentage of successful builds | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -
DevLake Components
- -A DevLake installation typically consists of the following components: - -- Config UI: A handy user interface to create, trigger, and debug data pipelines. -- API Server: The main programmatic interface of DevLake. -- Runner: The runner does all the heavy-lifting for executing tasks. In the default DevLake installation, it runs within the API Server, but DevLake provides a temporal-based runner (beta) for production environments. -- Database: The database stores both DevLake's metadata and user data collected by data pipelines. DevLake supports MySQL and PostgreSQL as of v0.11. -- Plugins: Plugins enable DevLake to collect and analyze dev data from any DevOps tools with an accessible API. DevLake community is actively adding plugins for popular DevOps tools, but if your preferred tool is not covered yet, feel free to open a GitHub issue to let us know or check out our doc on how to build a new plugin by yourself. -- Dashboards: Dashboards deliver data and insights to DevLake users. A dashboard is simply a collection of SQL queries along with corresponding visualization configurations. DevLake's official dashboard tool is Grafana and pre-built dashboards are shipped in Grafana's JSON format. Users are welcome to swap for their own choice of dashboard/BI tool if desired. - -## Dataflow - - -DevLake Dataflow
- -A typical plugin's dataflow is illustrated below: - -1. The Raw layer stores the API responses from data sources (DevOps tools) in JSON. This saves developers' time if the raw data is to be transformed differently later on. Please note that communicating with data sources' APIs is usually the most time-consuming step. -2. The Tool layer extracts raw data from JSONs into a relational schema that's easier to consume by analytical tasks. Each DevOps tool would have a schema that's tailored to their data structure, hence the name, the Tool layer. -3. The Domain layer attempts to build a layer of abstraction on top of the Tool layer so that analytics logics can be re-used across different tools. For example, GitHub's Pull Request (PR) and GitLab's Merge Request (MR) are similar entities. They each have their own table name and schema in the Tool layer, but they're consolidated into a single entity in the Domain layer, so that developers only need to implement metrics like Cycle Time and Code Review Rounds once against the domain layer schema. - -## Principles - -1. Extensible: DevLake's plugin system allows users to integrate with any DevOps tool. DevLake also provides a dbt plugin that enables users to define their own data transformation and analysis workflows. -2. Portable: DevLake has a modular design and provides multiple options for each module. Users of different setups can freely choose the right configuration for themselves. -3. Robust: DevLake provides an SDK to help plugins efficiently and reliably collect data from data sources while respecting their API rate limits and constraints. - -Category | -Metric Name | -Definition | -Data Required | -Use Scenarios and Recommended Practices | -Value | -
---|---|---|---|---|---|
Delivery Velocity | -Requirement Count | -Number of issues in type "Requirement" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process.
- 2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. - 3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. - 4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. |
- 1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources.
- 2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. |
-
Requirement Delivery Rate | -Ratio of delivered requirements to all requirements | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -|||
Requirement Lead Time | -Lead time of issues with type "Requirement" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the trend of requirement lead time to observe if it has improved over time.
- 2. Analyze and compare the requirement lead time of each project/team to identify key projects with abnormal lead time. - 3. Drill down to analyze a requirement's staying time in different phases of SDLC. Analyze the bottleneck of delivery velocity and improve the workflow. |
- 1. Analyze key projects and critical points, identify good/to-be-improved practices that affect requirement lead time, and reduce the risk of delays
- 2. Focus on the end-to-end velocity of value delivery process; coordinate different parts of R&D to avoid efficiency shafts; make targeted improvements to bottlenecks. |
- |
Requirement Granularity | -Number of story points associated with an issue | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Analyze the story points/requirement lead time of requirements to evaluate whether the ticket size, ie. requirement complexity is optimal.
- 2. Compare the estimated requirement granularity with the actual situation and evaluate whether the difference is reasonable by combining more microscopic workload metrics (e.g. lines of code/code equivalents) |
- 1. Promote product teams to split requirements carefully, improve requirements quality, help developers understand requirements clearly, deliver efficiently and with high quality, and improve the project management capability of the team.
- 2. Establish a data-supported workload estimation model to help R&D teams calibrate their estimation methods and more accurately assess the granularity of requirements, which is useful to achieve better issue planning in project management. |
- |
Commit Count | -Number of Commits | -Source Code Management entities: Git/GitHub/GitLab commits | -
-1. Identify the main reasons for the unusual number of commits and the possible impact on the number of commits through comparison
- 2. Evaluate whether the number of commits is reasonable in conjunction with more microscopic workload metrics (e.g. lines of code/code equivalents) |
- 1. Identify potential bottlenecks that may affect output
- 2. Encourage R&D practices of small step submissions and develop excellent coding habits |
- |
Added Lines of Code | -Accumulated number of added lines of code | -Source Code Management entities: Git/GitHub/GitLab commits | -
-1. From the project/team dimension, observe the accumulated change in Added lines to assess the team activity and code growth rate
- 2. From version cycle dimension, observe the active time distribution of code changes, and evaluate the effectiveness of project development model. - 3. From the member dimension, observe the trend and stability of code output of each member, and identify the key points that affect code output by comparison. |
- 1. identify potential bottlenecks that may affect the output
- 2. Encourage the team to implement a development model that matches the business requirements; develop excellent coding habits |
- |
Deleted Lines of Code | -Accumulated number of deleted lines of code | -Source Code Management entities: Git/GitHub/GitLab commits | -|||
Pull Request Review Time | -Time from Pull/Merge created time until merged | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | --1. Observe the mean and distribution of code review time from the project/team/individual dimension to assess the rationality of the review time | -1. Take inventory of project/team code review resources to avoid lack of resources and backlog of review sessions, resulting in long waiting time
- 2. Encourage teams to implement an efficient and responsive code review mechanism |
- |
Bug Age | -Lead time of issues in type "Bug" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. Observe the trend of bug age and locate the key reasons. -2. According to the severity level, type (business, functional classification), affected module, source of bugs, count and observe the length of bug and incident age. |
- 1. Help the team to establish an effective hierarchical response mechanism for bugs and incidents. Focus on the resolution of important problems in the backlog. -2. Improve team's and individual's bug/incident fixing efficiency. Identify good/to-be-improved practices that affect bug age or incident age |
- |
Incident Age | -Lead time of issues in type "Incident" | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -|||
Delivery Quality | -Pull Request Count | -Number of Pull/Merge Requests | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -
-1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. |
- 1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation |
-
Pull Request Pass Rate | -Ratio of Pull/Merge Review requests to merged | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Pull Request Review Rounds | -Number of cycles of commits followed by comments/final merge | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Pull Request Review Count | -Number of Pull/Merge Reviewers | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -1. As a secondary indicator, assess the cost of labor invested in the code review process | -1. Take inventory of project/team code review resources to avoid long waits for review sessions due to insufficient resource input | -|
Bug Count | -Number of bugs found during testing | -Issue/Task Management entities: Jira issues, GitHub issues, etc | -
-1. From the project or team dimension, observe the statistics on the total number of defects, the distribution of the number of defects in each severity level/type/owner, the cumulative trend of defects, and the change trend of the defect rate in thousands of lines, etc. -2. From version cycle dimension, observe the statistics on the cumulative trend of the number of defects/defect rate, which can be used to determine whether the growth rate of defects is slowing down, showing a flat convergence trend, and is an important reference for judging the stability of software version quality -3. From the time dimension, analyze the trend of the number of test defects, defect rate to locate the key items/key points -4. Evaluate whether the software quality and test plan are reasonable by referring to CMMI standard values |
- 1. Defect drill-down analysis to inform the development of design and code review strategies and to improve the internal QA process -2. Assist teams to locate projects/modules with higher defect severity and density, and clean up technical debts -3. Analyze critical points, identify good/to-be-improved practices that affect defect count or defect rate, to reduce the amount of future defects |
- |
Incident Count | -Number of Incidents found after shipping | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Bugs Count per 1k Lines of Code | -Amount of bugs per 1,000 lines of code | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Incidents Count per 1k Lines of Code | -Amount of incidents per 1,000 lines of code | -Source Code Management entities: GitHub PRs, GitLab MRs, etc | -|||
Delivery Cost | -Commit Author Count | -Number of Contributors who have committed code | -Source Code Management entities: Git/GitHub/GitLab commits | -1. As a secondary indicator, this helps assess the labor cost of participating in coding | -1. Take inventory of project/team R&D resource inputs, assess input-output ratio, and rationalize resource deployment | -
Delivery Capability | -Build Count | -The number of builds started | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -1. From the project dimension, compare the number of builds and success rate by combining the project phase and the complexity of tasks -2. From the time dimension, analyze the trend of the number of builds and success rate to see if it has improved over time |
- 1. As a process indicator, it reflects the value flow efficiency of upstream production and research links -2. Identify excellent/to-be-improved practices that impact the build, and drive the team to precipitate reusable tools and mechanisms to build infrastructure for fast and high-frequency delivery |
-
Build Duration | -The duration of successful builds | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -|||
Build Success Rate | -The percentage of successful builds | -CI/CD entities: Jenkins PRs, GitLabCI MRs, etc | -
DevLake Components
- -A DevLake installation typically consists of the following components: - -- Config UI: A handy user interface to create, trigger, and debug Blueprints. A Blueprint specifies the where (data connection), what (data scope), how (transformation rule), and when (sync frequency) of a data pipeline. -- API Server: The main programmatic interface of DevLake. -- Runner: The runner does all the heavy-lifting for executing tasks. In the default DevLake installation, it runs within the API Server, but DevLake provides a temporal-based runner (beta) for production environments. -- Database: The database stores both DevLake's metadata and user data collected by data pipelines. DevLake supports MySQL and PostgreSQL as of v0.11. -- Plugins: Plugins enable DevLake to collect and analyze dev data from any DevOps tools with an accessible API. DevLake community is actively adding plugins for popular DevOps tools, but if your preferred tool is not covered yet, feel free to open a GitHub issue to let us know or check out our doc on how to build a new plugin by yourself. -- Dashboards: Dashboards deliver data and insights to DevLake users. A dashboard is simply a collection of SQL queries along with corresponding visualization configurations. DevLake's official dashboard tool is Grafana and pre-built dashboards are shipped in Grafana's JSON format. Users are welcome to swap for their own choice of dashboard/BI tool if desired. - -## Dataflow - - -DevLake Dataflow
- -A typical plugin's dataflow is illustrated below: - -1. The Raw layer stores the API responses from data sources (DevOps tools) in JSON. This saves developers' time if the raw data is to be transformed differently later on. Please note that communicating with data sources' APIs is usually the most time-consuming step. -2. The Tool layer extracts raw data from JSONs into a relational schema that's easier to consume by analytical tasks. Each DevOps tool would have a schema that's tailored to their data structure, hence the name, the Tool layer. -3. The Domain layer attempts to build a layer of abstraction on top of the Tool layer so that analytics logics can be re-used across different tools. For example, GitHub's Pull Request (PR) and GitLab's Merge Request (MR) are similar entities. They each have their own table name and schema in the Tool layer, but they're consolidated into a single entity in the Domain layer, so that developers only need to implement metrics like Cycle Time and Code Review Rounds once against the domain layer schema. - -## Principles - -1. Extensible: DevLake's plugin system allows users to integrate with any DevOps tool. DevLake also provides a dbt plugin that enables users to define their own data transformation and analysis workflows. -2. Portable: DevLake has a modular design and provides multiple options for each module. Users of different setups can freely choose the right configuration for themselves. -3. Robust: DevLake provides an SDK to help plugins efficiently and reliably collect data from data sources while respecting their API rate limits and constraints. - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on: -- `Deployments` collected in one of the following ways: - - Open APIs of Jenkins, GitLab, GitHub, etc. - - Webhook for general CI tools. - - Releases and PR/MRs from GitHub, GitLab APIs, etc. -- `Incidents` collected in one of the following ways: - - Issue tracking tools such as Jira, TAPD, GitHub, etc. - - Incident or Service Monitoring tools such as PagerDuty, ServiceNow, etc. - -Transformation Rules Required - -This metric relies on: -- Deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as `Deployments`. -- Incident configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - -## How to improve? -- Add unit tests for all new feature -- "Shift left", start QA early and introduce more automated tests -- Enforce code review if it's not strictly executed diff --git a/versioned_docs/version-v0.13/Metrics/CodingTime.md b/versioned_docs/version-v0.13/Metrics/CodingTime.md deleted file mode 100644 index d788474810c..00000000000 --- a/versioned_docs/version-v0.13/Metrics/CodingTime.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "PR Coding Time" -description: > - PR Coding Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from the first commit until a PR is issued. - -## Why is it important? -It is recommended that you keep every task on a workable and manageable scale for a reasonably short amount of coding time. The average coding time of most engineering teams is around 3-4 days. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -Divide coding tasks into workable and manageable pieces. diff --git a/versioned_docs/version-v0.13/Metrics/CommitAuthorCount.md b/versioned_docs/version-v0.13/Metrics/CommitAuthorCount.md deleted file mode 100644 index 3be4ad20633..00000000000 --- a/versioned_docs/version-v0.13/Metrics/CommitAuthorCount.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Commit Author Count" -description: > - Commit Author Count -sidebar_position: 14 ---- - -## What is this metric? -The number of commit authors who have committed code. - -## Why is it important? -Take inventory of project/team R&D resource inputs, assess input-output ratio, and rationalize resource deployment. - - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -This metric is calculated by counting the number of commit authors in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - - -## How to improve? -As a secondary indicator, this helps assess the labor cost of participating in coding. diff --git a/versioned_docs/version-v0.13/Metrics/CommitCount.md b/versioned_docs/version-v0.13/Metrics/CommitCount.md deleted file mode 100644 index ae85af8d2cd..00000000000 --- a/versioned_docs/version-v0.13/Metrics/CommitCount.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "Commit Count" -description: > - Commit Count -sidebar_position: 6 ---- - -## What is this metric? -The number of commits created. - -## Why is it important? -1. Identify potential bottlenecks that may affect output -2. Encourage R&D practices of small step submissions and develop excellent coding habits - -## Which dashboard(s) does it exist in -- GitHub Release Quality and Contribution Analysis -- Demo-Is this month more productive than last? -- Demo-Commit Count by Author - -## How is it calculated? -This metric is calculated by counting the number of commits in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -SQL Queries - -If you want to see the monthly trend, run the following SQL -``` - with _commits as( - SELECT - DATE_ADD(date(authored_date), INTERVAL -DAY(date(authored_date))+1 DAY) as time, - count(*) as commit_count - FROM commits - WHERE - message not like '%Merge%' - and $__timeFilter(authored_date) - group by 1 - ) - - SELECT - date_format(time,'%M %Y') as month, - commit_count as "Commit Count" - FROM _commits - ORDER BY time -``` - -## How to improve? -1. Identify the main reasons for the unusual number of commits and the possible impact on the number of commits through comparison -2. Evaluate whether the number of commits is reasonable in conjunction with more microscopic workload metrics (e.g. lines of code/code equivalents) diff --git a/versioned_docs/version-v0.13/Metrics/CycleTime.md b/versioned_docs/version-v0.13/Metrics/CycleTime.md deleted file mode 100644 index bbc98349ab8..00000000000 --- a/versioned_docs/version-v0.13/Metrics/CycleTime.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "PR Cycle Time" -description: > - PR Cycle Time -sidebar_position: 2 ---- - -## What is this metric? -PR Cycle Time is the sum of PR Coding Time, Pickup TIme, Review Time and Deploy Time. It is the total time from the first commit to when the PR is deployed. - -## Why is it important? -PR Cycle Time indicate the overall speed of the delivery progress in terms of PR. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md). - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Divide coding tasks into workable and manageable pieces; -2. Use DevLake's dashboards to monitor your delivery progress; -3. Have a habit to check for hanging PRs regularly; -4. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued; -2. Use automated tests for the initial work; -5. Reduce PR size; -6. Analyze the causes for long reviews. \ No newline at end of file diff --git a/versioned_docs/version-v0.13/Metrics/DeletedLinesOfCode.md b/versioned_docs/version-v0.13/Metrics/DeletedLinesOfCode.md deleted file mode 100644 index 218ceae0c54..00000000000 --- a/versioned_docs/version-v0.13/Metrics/DeletedLinesOfCode.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Deleted Lines of Code" -description: > - Deleted Lines of Code -sidebar_position: 8 ---- - -## What is this metric? -The accumulated number of deleted lines of code. - -## Why is it important? -1. identify potential bottlenecks that may affect the output -2. Encourage the team to implement a development model that matches the business requirements; develop excellent coding habits - -## Which dashboard(s) does it exist in -N/A - -## How is it calculated? -This metric is calculated by summing the deletions of commits in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -## How to improve? -1. From the project/team dimension, observe the accumulated change in Added lines to assess the team activity and code growth rate -2. From version cycle dimension, observe the active time distribution of code changes, and evaluate the effectiveness of project development model. -3. From the member dimension, observe the trend and stability of code output of each member, and identify the key points that affect code output by comparison. diff --git a/versioned_docs/version-v0.13/Metrics/DeployTime.md b/versioned_docs/version-v0.13/Metrics/DeployTime.md deleted file mode 100644 index d908480829f..00000000000 --- a/versioned_docs/version-v0.13/Metrics/DeployTime.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "PR Deploy Time" -description: > - PR Deploy Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is merged to when it is deployed. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in? - - -## How is it calculated? -You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md). - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -## How to improve? - diff --git a/versioned_docs/version-v0.13/Metrics/DeploymentFrequency.md b/versioned_docs/version-v0.13/Metrics/DeploymentFrequency.md deleted file mode 100644 index 6b318535c51..00000000000 --- a/versioned_docs/version-v0.13/Metrics/DeploymentFrequency.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "DORA - Deployment Frequency(WIP)" -description: > - DORA - Deployment Frequency -sidebar_position: 18 ---- - -## What is this metric? -How often an organization deploys code to production or release it to end users. - -## Why is it important? -Deployment frequency reflects the efficiency of a team's deployment. A team that deploys more frequently can deliver the product faster and users' feature requirements can be met faster. - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -Deployment frequency is calculated based on the number of deployment days, not the number of deployments, e.g.,daily, weekly, monthly, yearly. - -| Groups | Benchmarks | -| -----------------| -------------------------------------| -| Elite performers | Multiple times a day | -| High performers | Once a week to once a month | -| Medium performers| Once a month to once every six months| -| Low performers | Less than once every six months | - -Source: 2021 Accelerate State of DevOps, Google
- - -Data Sources Required - -This metric relies on deployments collected in multiple ways: -- Open APIs of Jenkins, GitLab, GitHub, etc. -- Webhook for general CI tools. -- Releases and PR/MRs from GitHub, GitLab APIs, etc. - -Transformation Rules Required - -This metric relies on the deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as deployments. - -## How to improve? -- Trunk development. Work in small batches and often merge their work into shared trunks. -- Integrate CI/CD tools for automated deployment -- Improve automated test coverage diff --git a/versioned_docs/version-v0.13/Metrics/IncidentAge.md b/versioned_docs/version-v0.13/Metrics/IncidentAge.md deleted file mode 100644 index 4cd5e60cbb5..00000000000 --- a/versioned_docs/version-v0.13/Metrics/IncidentAge.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Incident Age" -description: > - Incident Age -sidebar_position: 10 ---- - -## What is this metric? -The amount of time it takes a incident to fix. - -## Why is it important? -1. Help the team to establish an effective hierarchical response mechanism for incidents. Focus on the resolution of important problems in the backlog. -2. Improve team's and individual's incident fixing efficiency. Identify good/to-be-improved practices that affect incident age - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -This metric equals to `resolution_date` - `created_date` of issues in type "INCIDENT". - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-incident' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - - -## How to improve? -1. Observe the trend of incident age and locate the key reasons. -2. According to the severity level, type (business, functional classification), affected module, source of bugs, count and observe the length of incident age. \ No newline at end of file diff --git a/versioned_docs/version-v0.13/Metrics/IncidentCountPer1kLinesOfCode.md b/versioned_docs/version-v0.13/Metrics/IncidentCountPer1kLinesOfCode.md deleted file mode 100644 index 9ad92787780..00000000000 --- a/versioned_docs/version-v0.13/Metrics/IncidentCountPer1kLinesOfCode.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Incident Count per 1k Lines of Code" -description: > - Incident Count per 1k Lines of Code -sidebar_position: 13 ---- - -## What is this metric? -Amount of incidents per 1,000 lines of code. - -## Why is it important? -1. Defect drill-down analysis to inform the development of design and code review strategies and to improve the internal QA process -2. Assist teams to locate projects/modules with higher defect severity and density, and clean up technical debts -3. Analyze critical points, identify good/to-be-improved practices that affect defect count or defect rate, to reduce the amount of future defects - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -The number of incidents divided by total accumulated lines of code (additions + deletions) in the given data range. - -Data Sources Required - -This metric relies on -- issues collected from Jira, GitHub or TAPD. -- commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -This metric relies on -- "Issue type mapping" in Jira, GitHub or TAPD's transformation rules page to let DevLake know what type(s) of issues can be regarded as incidents. -- "PR-Issue Mapping" in GitHub, GitLab's transformation rules page to let DevLake know the bugs are fixed by which PR/MRs. - -## How to improve? -1. From the project or team dimension, observe the statistics on the total number of defects, the distribution of the number of defects in each severity level/type/owner, the cumulative trend of defects, and the change trend of the defect rate in thousands of lines, etc. -2. From version cycle dimension, observe the statistics on the cumulative trend of the number of defects/defect rate, which can be used to determine whether the growth rate of defects is slowing down, showing a flat convergence trend, and is an important reference for judging the stability of software version quality -3. From the time dimension, analyze the trend of the number of test defects, defect rate to locate the key items/key points -4. Evaluate whether the software quality and test plan are reasonable by referring to CMMI standard values diff --git a/versioned_docs/version-v0.13/Metrics/LeadTimeForChanges.md b/versioned_docs/version-v0.13/Metrics/LeadTimeForChanges.md deleted file mode 100644 index b964f2009e0..00000000000 --- a/versioned_docs/version-v0.13/Metrics/LeadTimeForChanges.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "DORA - Lead Time for Changes(WIP)" -description: > - DORA - Lead Time for Changes -sidebar_position: 19 ---- - -## What is this metric? -The median amount of time for a commit to be deployed into production. - -## Why is it important? -This metric measures the time it takes to commit code to the production environment and reflects the speed of software delivery. A lower average change preparation time means that your team is efficient at coding and deploying your project. - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -This metric can be calculated in two ways: -- If a deployment can be linked to PRs, then the lead time for changes of a deployment is the average cycle time of its associated PRs. For instance, - - Compared to the previous deployment `deploy-1`, `deploy-2` deployed three new commits `commit-1`, `commit-2` and `commit-3`. - - `commit-1` is linked to `pr-1`, `commit-2` is linked to `pr-2` and `pr-3`, `commit-3` is not linked to any PR. Then, `deploy-2` is associated with `pr-1`, `pr-2` and `pr-3`. - - `Deploy-2`'s lead time for changes = average cycle time of `pr-1`, `pr-2` and `pr-3`. -- If a deployment can't be linked to PRs, then the lead time for changes is computed based on its associated commits. For instance, - - Compared to the previous deployment `deploy-1`, `deploy-2` deployed three new commits `commit-1`, `commit-2` and `commit-3`. - - None of `commit-1`, `commit-2` and `commit-3` is linked to any PR. - - Calculate each commit's lead time for changes, which equals to `deploy-2`'s deployed_at - commit's authored_date - - `Deploy-2`'s Lead time for changes = average lead time for changes of `commit-1`, `commit-2` and `commit-3`. - -Below are the benchmarks for different development teams: - -| Groups | Benchmarks | -| -----------------| -------------------------------------| -| Elite performers | Less than one hour | -| High performers | Between one day and one week | -| Medium performers| Between one month and six months | -| Low performers | More than six months | - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on deployments collected in multiple ways: -- Open APIs of Jenkins, GitLab, GitHub, etc. -- Webhook for general CI tools. -- Releases and PR/MRs from GitHub, GitLab APIs, etc. - -Transformation Rules Required - -This metric relies on the deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as deployments. - -## How to improve? -- Break requirements into smaller, more manageable deliverables -- Optimize the code review process -- "Shift left", start QA early and introduce more automated tests -- Integrate CI/CD tools to automate the deployment process diff --git a/versioned_docs/version-v0.13/Metrics/MTTR.md b/versioned_docs/version-v0.13/Metrics/MTTR.md deleted file mode 100644 index f76be2490f8..00000000000 --- a/versioned_docs/version-v0.13/Metrics/MTTR.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "DORA - Mean Time to Restore Service" -description: > - DORA - Mean Time to Restore Service -sidebar_position: 20 ---- - -## What is this metric? -The time to restore service after service incidents, rollbacks, or any type of production failure happened. - -## Why is it important? -This metric is essential to measure the disaster control capability of your team and the robustness of the software. - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -MTTR = Total [incident age](./IncidentAge.md) (in hours)/number of incidents. - -If you have three incidents that happened in the given data range, one lasting 1 hour, one lasting 2 hours and one lasting 3 hours. Your MTTR will be: (1 + 2 + 3) / 3 = 2 hours. - -Below are the benchmarks for different development teams: - -| Groups | Benchmarks | -| -----------------| -------------------------------------| -| Elite performers | Less than one hour | -| High performers | Less one day | -| Medium performers| Between one day and one week | -| Low performers | More than six months | - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on: -- `Deployments` collected in one of the following ways: - - Open APIs of Jenkins, GitLab, GitHub, etc. - - Webhook for general CI tools. - - Releases and PR/MRs from GitHub, GitLab APIs, etc. -- `Incidents` collected in one of the following ways: - - Issue tracking tools such as Jira, TAPD, GitHub, etc. - - Incident or Service Monitoring tools such as PagerDuty, ServiceNow, etc. - -Transformation Rules Required - -This metric relies on: -- Deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as `Deployments`. -- Incident configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - -## How to improve? -- Use automated tools to quickly report failure -- Prioritize recovery when a failure happens -- Establish a go-to action plan to respond to failures immediately -- Reduce the deployment time for failure-fixing diff --git a/versioned_docs/version-v0.13/Metrics/MergeRate.md b/versioned_docs/version-v0.13/Metrics/MergeRate.md deleted file mode 100644 index c8c274338c9..00000000000 --- a/versioned_docs/version-v0.13/Metrics/MergeRate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "PR Merge Rate" -description: > - Pull Request Merge Rate -sidebar_position: 12 ---- - -## What is this metric? -The ratio of PRs/MRs that get merged. - -## Why is it important? -1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- GitLab -- Weekly Community Retro -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -The number of merged PRs divided by the number of all PRs in the given data range. - -Data Sources Required - -This metric relies on PRs/MRs collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - - -## How to improve? -1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. diff --git a/versioned_docs/version-v0.13/Metrics/PRCount.md b/versioned_docs/version-v0.13/Metrics/PRCount.md deleted file mode 100644 index 4521e78617a..00000000000 --- a/versioned_docs/version-v0.13/Metrics/PRCount.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Pull Request Count" -description: > - Pull Request Count -sidebar_position: 11 ---- - -## What is this metric? -The number of pull requests created. - -## Why is it important? -1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- GitLab -- Weekly Community Retro -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is calculated by counting the number of PRs in the given data range. - -Data Sources Required - -This metric relies on PRs/MRs collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -## How to improve? -1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. diff --git a/versioned_docs/version-v0.13/Metrics/PRSize.md b/versioned_docs/version-v0.13/Metrics/PRSize.md deleted file mode 100644 index bf6a87d82d9..00000000000 --- a/versioned_docs/version-v0.13/Metrics/PRSize.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "PR Size" -description: > - PR Size -sidebar_position: 2 ---- - -## What is this metric? -The average code changes (in Lines of Code) of PRs in the selected time range. - -## Why is it important? -Small PRs can reduce risks of introducing new bugs and increase code review quality, as problems may often be hidden in big chuncks of code and difficult to identify. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is calculated by counting the total number of code changes (in LOC) divided by the total number of PRs in the selected time range. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Divide coding tasks into workable and manageable pieces; -1. Encourage developers to submit small PRs and only keep related changes in the same PR. diff --git a/versioned_docs/version-v0.13/Metrics/PickupTime.md b/versioned_docs/version-v0.13/Metrics/PickupTime.md deleted file mode 100644 index 07242ae772b..00000000000 --- a/versioned_docs/version-v0.13/Metrics/PickupTime.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "PR Pickup Time" -description: > - PR Pickup Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is issued until the first comment is added to that PR. - -## Why is it important? -PR Pickup Time shows how engaged your team is in collaborative work by identifying the delay in picking up PRs. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboard to monitor your delivery progress; -2. Have a habit to check for hanging PRs regularly; -3. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued. diff --git a/versioned_docs/version-v0.13/Metrics/RequirementCount.md b/versioned_docs/version-v0.13/Metrics/RequirementCount.md deleted file mode 100644 index e9a6bd32981..00000000000 --- a/versioned_docs/version-v0.13/Metrics/RequirementCount.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "Requirement Count" -description: > - Requirement Count -sidebar_position: 2 ---- - -## What is this metric? -The number of delivered requirements or features. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -This metric is calculated by counting the number of delivered issues in type "REQUIREMENT" in the given data range. - -Data Sources Required - -This metric relies on the issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - -SQL Queries - -If you want to see a single count, run the following SQL in Grafana -``` - select - count(*) as "Requirement Count" - from issues i - join board_issues bi on i.id = bi.issue_id - where - i.type = 'REQUIREMENT' - and i.status = 'DONE' - -- this is the default variable in Grafana - and $__timeFilter(i.created_date) - and bi.board_id in ($board_id) -``` - -If you want to see the monthly trend, run the following SQL -``` - SELECT - DATE_ADD(date(i.created_date), INTERVAL -DAYOFMONTH(date(i.created_date))+1 DAY) as time, - count(distinct case when status != 'DONE' then i.id else null end) as "Number of Open Issues", - count(distinct case when status = 'DONE' then i.id else null end) as "Number of Delivered Issues" - FROM issues i - join board_issues bi on i.id = bi.issue_id - join boards b on bi.board_id = b.id - WHERE - i.type = 'REQUIREMENT' - and i.status = 'DONE' - and $__timeFilter(i.created_date) - and bi.board_id in ($board_id) - GROUP by 1 -``` - -## How to improve? -1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process. -2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. -3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. -4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. diff --git a/versioned_docs/version-v0.13/Metrics/RequirementDeliveryRate.md b/versioned_docs/version-v0.13/Metrics/RequirementDeliveryRate.md deleted file mode 100644 index eb0a03133d5..00000000000 --- a/versioned_docs/version-v0.13/Metrics/RequirementDeliveryRate.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Requirement Delivery Rate" -description: > - Requirement Delivery Rate -sidebar_position: 3 ---- - -## What is this metric? -The ratio of delivered requirements to all requirements. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -The number of delivered requirements divided by the total number of requirements in the given data range. - -Data Sources Required - -This metric relies on the issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process. -2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. -3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. -4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. diff --git a/versioned_docs/version-v0.13/Metrics/RequirementGranularity.md b/versioned_docs/version-v0.13/Metrics/RequirementGranularity.md deleted file mode 100644 index 03bb91767f5..00000000000 --- a/versioned_docs/version-v0.13/Metrics/RequirementGranularity.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Requirement Granularity" -description: > - Requirement Granularity -sidebar_position: 5 ---- - -## What is this metric? -The average number of story points per requirement. - -## Why is it important? -1. Promote product teams to split requirements carefully, improve requirements quality, help developers understand requirements clearly, deliver efficiently and with high quality, and improve the project management capability of the team. -2. Establish a data-supported workload estimation model to help R&D teams calibrate their estimation methods and more accurately assess the granularity of requirements, which is useful to achieve better issue planning in project management. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -The average story points of issues in type "REQUIREMENT" in the given data range. - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the story points/requirement lead time of requirements to evaluate whether the ticket size, ie. requirement complexity is optimal. -2. Compare the estimated requirement granularity with the actual situation and evaluate whether the difference is reasonable by combining more microscopic workload metrics (e.g. lines of code/code equivalents) diff --git a/versioned_docs/version-v0.13/Metrics/RequirementLeadTime.md b/versioned_docs/version-v0.13/Metrics/RequirementLeadTime.md deleted file mode 100644 index 74061d63dec..00000000000 --- a/versioned_docs/version-v0.13/Metrics/RequirementLeadTime.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Requirement Lead Time" -description: > - Requirement Lead Time -sidebar_position: 4 ---- - -## What is this metric? -The amount of time it takes a requirement to deliver. - -## Why is it important? -1. Analyze key projects and critical points, identify good/to-be-improved practices that affect requirement lead time, and reduce the risk of delays -2. Focus on the end-to-end velocity of value delivery process; coordinate different parts of R&D to avoid efficiency shafts; make targeted improvements to bottlenecks. - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- Community Experience - - -## How is it calculated? -This metric equals to `resolution_date` - `created_date` of issues in type "REQUIREMENT". - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the trend of requirement lead time to observe if it has improved over time. -2. Analyze and compare the requirement lead time of each project/team to identify key projects with abnormal lead time. -3. Drill down to analyze a requirement's staying time in different phases of SDLC. Analyze the bottleneck of delivery velocity and improve the workflow. \ No newline at end of file diff --git a/versioned_docs/version-v0.13/Metrics/ReviewDepth.md b/versioned_docs/version-v0.13/Metrics/ReviewDepth.md deleted file mode 100644 index 59bcfbe876c..00000000000 --- a/versioned_docs/version-v0.13/Metrics/ReviewDepth.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "PR Review Depth" -description: > - PR Review Depth -sidebar_position: 2 ---- - -## What is this metric? -The average number of comments of PRs in the selected time range. - -## Why is it important? -PR Review Depth (in Comments per RR) is related to the quality of code review, indicating how thorough your team reviews PRs. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - -## How is it calculated? -This metric is calculated by counting the total number of PR comments divided by the total number of PRs in the selected time range. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Encourage multiple reviewers to review a PR; -2. Review Depth is an indicator for generally how thorough your PRs are reviewed, but it does not mean the deeper the better. In some cases, spending an excessive amount of resources on reviewing PRs is also not recommended. \ No newline at end of file diff --git a/versioned_docs/version-v0.13/Metrics/ReviewTime.md b/versioned_docs/version-v0.13/Metrics/ReviewTime.md deleted file mode 100644 index 8cfe080b0cc..00000000000 --- a/versioned_docs/version-v0.13/Metrics/ReviewTime.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "PR Review Time" -description: > - PR Review Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes to complete a code review of a PR before it gets merged. - -## Why is it important? -Code review should be conducted almost in real-time and usually take less than two days. Abnormally long PR Review Time may indicate one or more of the following problems: -1. The PR size is too large that makes it difficult to review. -2. The team is too busy to review code. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is the time frame between when the first comment is added to a PR, to when the PR is merged. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboards to monitor your delivery progress; -2. Use automated tests for the initial work; -3. Reduce PR size; -4. Analyze the causes for long reviews. \ No newline at end of file diff --git a/versioned_docs/version-v0.13/Metrics/TimeToMerge.md b/versioned_docs/version-v0.13/Metrics/TimeToMerge.md deleted file mode 100644 index 04a39225fe0..00000000000 --- a/versioned_docs/version-v0.13/Metrics/TimeToMerge.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "PR Time To Merge" -description: > - PR Time To Merge -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is issued to when it is merged. Essentially, PR Time to Merge = PR Pickup Time + PR Review Time. - -## Why is it important? -The delay of reviewing and waiting to review PRs has large impact on delivery speed, while reasonably short PR Time to Merge can indicate frictionless teamwork. Improving on this metric is the key to reduce PR cycle time. - -## Which dashboard(s) does it exist in? -- GitHub Basic Metrics -- Bi-weekly Community Retro - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboards to monitor your delivery progress; -2. Have a habit to check for hanging PRs regularly; -3. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued; -4. Reduce PR size; -5. Analyze the causes for long reviews. diff --git a/versioned_docs/version-v0.13/Metrics/_category_.json b/versioned_docs/version-v0.13/Metrics/_category_.json deleted file mode 100644 index e944147d528..00000000000 --- a/versioned_docs/version-v0.13/Metrics/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Metrics", - "position": 5, - "link":{ - "type": "generated-index", - "slug": "Metrics" - } -} diff --git a/versioned_docs/version-v0.13/Overview/Architecture.md b/versioned_docs/version-v0.13/Overview/Architecture.md deleted file mode 100755 index d4c6a9c5340..00000000000 --- a/versioned_docs/version-v0.13/Overview/Architecture.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Architecture" -description: > - Understand the architecture of Apache DevLake -sidebar_position: 2 ---- - -## Architecture Overview - - -DevLake Components
- -A DevLake installation typically consists of the following components: - -- Config UI: A handy user interface to create, trigger, and debug Blueprints. A Blueprint specifies the where (data connection), what (data scope), how (transformation rule), and when (sync frequency) of a data pipeline. -- API Server: The main programmatic interface of DevLake. -- Runner: The runner does all the heavy-lifting for executing tasks. In the default DevLake installation, it runs within the API Server, but DevLake provides a temporal-based runner (beta) for production environments. -- Database: The database stores both DevLake's metadata and user data collected by data pipelines. DevLake supports MySQL and PostgreSQL as of v0.11. -- Plugins: Plugins enable DevLake to collect and analyze dev data from any DevOps tools with an accessible API. DevLake community is actively adding plugins for popular DevOps tools, but if your preferred tool is not covered yet, feel free to open a GitHub issue to let us know or check out our doc on how to build a new plugin by yourself. -- Dashboards: Dashboards deliver data and insights to DevLake users. A dashboard is simply a collection of SQL queries along with corresponding visualization configurations. DevLake's official dashboard tool is Grafana and pre-built dashboards are shipped in Grafana's JSON format. Users are welcome to swap for their own choice of dashboard/BI tool if desired. - -## Dataflow - - -DevLake Dataflow
- -A typical plugin's dataflow is illustrated below: - -1. The Raw layer stores the API responses from data sources (DevOps tools) in JSON. This saves developers' time if the raw data is to be transformed differently later on. Please note that communicating with data sources' APIs is usually the most time-consuming step. -2. The Tool layer extracts raw data from JSONs into a relational schema that's easier to consume by analytical tasks. Each DevOps tool would have a schema that's tailored to their data structure, hence the name, the Tool layer. -3. The Domain layer attempts to build a layer of abstraction on top of the Tool layer so that analytics logics can be re-used across different tools. For example, GitHub's Pull Request (PR) and GitLab's Merge Request (MR) are similar entities. They each have their own table name and schema in the Tool layer, but they're consolidated into a single entity in the Domain layer, so that developers only need to implement metrics like Cycle Time and Code Review Rounds once against the domain layer schema. - -## Principles - -1. Extensible: DevLake's plugin system allows users to integrate with any DevOps tool. DevLake also provides a dbt plugin that enables users to define their own data transformation and analysis workflows. -2. Portable: DevLake has a modular design and provides multiple options for each module. Users of different setups can freely choose the right configuration for themselves. -3. Robust: DevLake provides an SDK to help plugins efficiently and reliably collect data from data sources while respecting their API rate limits and constraints. - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on: -- `Deployments` collected in one of the following ways: - - Open APIs of Jenkins, GitLab, GitHub, etc. - - Webhook for general CI tools. - - Releases and PR/MRs from GitHub, GitLab APIs, etc. -- `Incidents` collected in one of the following ways: - - Issue tracking tools such as Jira, TAPD, GitHub, etc. - - Incident or Service Monitoring tools such as PagerDuty, ServiceNow, etc. - -Transformation Rules Required - -This metric relies on: -- Deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as `Deployments`. -- Incident configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - -SQL Queries - -If you want to measure the monthly trend of change failure rate as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/cfr-monthly.jpeg) - -``` -with _deployments as ( --- get the deployment count each month - SELECT - date_format(finished_date,'%y/%m') as month, - COUNT(distinct id) AS deployment_count - FROM - cicd_tasks - WHERE - type = 'DEPLOYMENT' - and result = 'SUCCESS' - GROUP BY 1 -), - -_incidents as ( --- get the incident count each month - SELECT - date_format(created_date,'%y/%m') as month, - COUNT(distinct id) AS incident_count - FROM - issues - WHERE - type = 'INCIDENT' - GROUP BY 1 -), - -_calendar_months as( --- deal with the month with no incidents - SELECT date_format(CAST((SYSDATE()-INTERVAL (month_index) MONTH) AS date), '%y/%m') as month - FROM ( SELECT 0 month_index - UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 - UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 - UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 - UNION ALL SELECT 10 UNION ALL SELECT 11 - ) month_index - WHERE (SYSDATE()-INTERVAL (month_index) MONTH) > SYSDATE()-INTERVAL 6 MONTH -) - -SELECT - cm.month, - case - when d.deployment_count is null or i.incident_count is null then 0 - else i.incident_count/d.deployment_count end as change_failure_rate -FROM - _calendar_months cm - left join _incidents i on cm.month = i.month - left join _deployments d on cm.month = d.month -ORDER BY 1 -``` - -If you want to measure in which category your team falls into as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/cfr-text.jpeg) - -``` -with _deployment_count as ( --- get the deployment deployed within the selected time period in the top-right corner - SELECT - COUNT(distinct id) AS deployment_count - FROM - cicd_tasks - WHERE - type = 'DEPLOYMENT' - and result = 'SUCCESS' - and $__timeFilter(finished_date) -), - -_incident_count as ( --- get the incident created within the selected time period in the top-right corner - SELECT - COUNT(distinct id) AS incident_count - FROM - issues - WHERE - type = 'INCIDENT' - and $__timeFilter(created_date) -) - -SELECT - case - when deployment_count is null or incident_count is null or deployment_count = 0 then NULL - when incident_count/deployment_count <= .15 then "0-15%" - when incident_count/deployment_count <= .20 then "16%-20%" - when incident_count/deployment_count <= .30 then "21%-30%" - else "> 30%" - end as change_failure_rate -FROM - _deployment_count, _incident_count -``` - -## How to improve? -- Add unit tests for all new feature -- "Shift left", start QA early and introduce more automated tests -- Enforce code review if it's not strictly executed diff --git a/versioned_docs/version-v0.14/Metrics/CodingTime.md b/versioned_docs/version-v0.14/Metrics/CodingTime.md deleted file mode 100644 index d788474810c..00000000000 --- a/versioned_docs/version-v0.14/Metrics/CodingTime.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "PR Coding Time" -description: > - PR Coding Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from the first commit until a PR is issued. - -## Why is it important? -It is recommended that you keep every task on a workable and manageable scale for a reasonably short amount of coding time. The average coding time of most engineering teams is around 3-4 days. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -Divide coding tasks into workable and manageable pieces. diff --git a/versioned_docs/version-v0.14/Metrics/CommitAuthorCount.md b/versioned_docs/version-v0.14/Metrics/CommitAuthorCount.md deleted file mode 100644 index 3be4ad20633..00000000000 --- a/versioned_docs/version-v0.14/Metrics/CommitAuthorCount.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Commit Author Count" -description: > - Commit Author Count -sidebar_position: 14 ---- - -## What is this metric? -The number of commit authors who have committed code. - -## Why is it important? -Take inventory of project/team R&D resource inputs, assess input-output ratio, and rationalize resource deployment. - - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -This metric is calculated by counting the number of commit authors in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - - -## How to improve? -As a secondary indicator, this helps assess the labor cost of participating in coding. diff --git a/versioned_docs/version-v0.14/Metrics/CommitCount.md b/versioned_docs/version-v0.14/Metrics/CommitCount.md deleted file mode 100644 index ae85af8d2cd..00000000000 --- a/versioned_docs/version-v0.14/Metrics/CommitCount.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "Commit Count" -description: > - Commit Count -sidebar_position: 6 ---- - -## What is this metric? -The number of commits created. - -## Why is it important? -1. Identify potential bottlenecks that may affect output -2. Encourage R&D practices of small step submissions and develop excellent coding habits - -## Which dashboard(s) does it exist in -- GitHub Release Quality and Contribution Analysis -- Demo-Is this month more productive than last? -- Demo-Commit Count by Author - -## How is it calculated? -This metric is calculated by counting the number of commits in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -SQL Queries - -If you want to see the monthly trend, run the following SQL -``` - with _commits as( - SELECT - DATE_ADD(date(authored_date), INTERVAL -DAY(date(authored_date))+1 DAY) as time, - count(*) as commit_count - FROM commits - WHERE - message not like '%Merge%' - and $__timeFilter(authored_date) - group by 1 - ) - - SELECT - date_format(time,'%M %Y') as month, - commit_count as "Commit Count" - FROM _commits - ORDER BY time -``` - -## How to improve? -1. Identify the main reasons for the unusual number of commits and the possible impact on the number of commits through comparison -2. Evaluate whether the number of commits is reasonable in conjunction with more microscopic workload metrics (e.g. lines of code/code equivalents) diff --git a/versioned_docs/version-v0.14/Metrics/CycleTime.md b/versioned_docs/version-v0.14/Metrics/CycleTime.md deleted file mode 100644 index bbc98349ab8..00000000000 --- a/versioned_docs/version-v0.14/Metrics/CycleTime.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "PR Cycle Time" -description: > - PR Cycle Time -sidebar_position: 2 ---- - -## What is this metric? -PR Cycle Time is the sum of PR Coding Time, Pickup TIme, Review Time and Deploy Time. It is the total time from the first commit to when the PR is deployed. - -## Why is it important? -PR Cycle Time indicate the overall speed of the delivery progress in terms of PR. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md). - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Divide coding tasks into workable and manageable pieces; -2. Use DevLake's dashboards to monitor your delivery progress; -3. Have a habit to check for hanging PRs regularly; -4. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued; -2. Use automated tests for the initial work; -5. Reduce PR size; -6. Analyze the causes for long reviews. \ No newline at end of file diff --git a/versioned_docs/version-v0.14/Metrics/DeletedLinesOfCode.md b/versioned_docs/version-v0.14/Metrics/DeletedLinesOfCode.md deleted file mode 100644 index 218ceae0c54..00000000000 --- a/versioned_docs/version-v0.14/Metrics/DeletedLinesOfCode.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Deleted Lines of Code" -description: > - Deleted Lines of Code -sidebar_position: 8 ---- - -## What is this metric? -The accumulated number of deleted lines of code. - -## Why is it important? -1. identify potential bottlenecks that may affect the output -2. Encourage the team to implement a development model that matches the business requirements; develop excellent coding habits - -## Which dashboard(s) does it exist in -N/A - -## How is it calculated? -This metric is calculated by summing the deletions of commits in the given data range. - -Data Sources Required - -This metric relies on commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -## How to improve? -1. From the project/team dimension, observe the accumulated change in Added lines to assess the team activity and code growth rate -2. From version cycle dimension, observe the active time distribution of code changes, and evaluate the effectiveness of project development model. -3. From the member dimension, observe the trend and stability of code output of each member, and identify the key points that affect code output by comparison. diff --git a/versioned_docs/version-v0.14/Metrics/DeployTime.md b/versioned_docs/version-v0.14/Metrics/DeployTime.md deleted file mode 100644 index d908480829f..00000000000 --- a/versioned_docs/version-v0.14/Metrics/DeployTime.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "PR Deploy Time" -description: > - PR Deploy Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is merged to when it is deployed. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in? - - -## How is it calculated? -You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md). - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -## How to improve? - diff --git a/versioned_docs/version-v0.14/Metrics/DeploymentFrequency.md b/versioned_docs/version-v0.14/Metrics/DeploymentFrequency.md deleted file mode 100644 index 90459adc593..00000000000 --- a/versioned_docs/version-v0.14/Metrics/DeploymentFrequency.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "DORA - Deployment Frequency" -description: > - DORA - Deployment Frequency -sidebar_position: 18 ---- - -## What is this metric? -How often an organization deploys code to production or release it to end users. - -## Why is it important? -Deployment frequency reflects the efficiency of a team's deployment. A team that deploys more frequently can deliver the product faster and users' feature requirements can be met faster. - -## Which dashboard(s) does it exist in -DORA dashboard. See [live demo](https://grafana-lake.demo.devlake.io/grafana/d/qNo8_0M4z/dora?orgId=1). - - -## How is it calculated? -Deployment frequency is calculated based on the number of deployment days, not the number of deployments, e.g.,daily, weekly, monthly, yearly. - -Below are the benchmarks for different development teams from Google's report. DevLake uses the same benchmarks. - -| Groups | Benchmarks | DevLake Benchmarks | -| -----------------| --------------------------------------------- | ---------------------------------------------- | -| Elite performers | On-demand (multiple deploys per day) | On-demand | -| High performers | Between once per week and once per month | Between once per week and once per month | -| Medium performers| Between once per month and once every 6 months| Between once per month and once every 6 months | -| Low performers | Fewer than once per six months | Fewer than once per six months | - -Source: 2021 Accelerate State of DevOps, Google
- - -Data Sources Required - -This metric relies on deployments collected in multiple ways: -- Open APIs of Jenkins, GitLab, GitHub, etc. -- Webhook for general CI tools. -- Releases and PR/MRs from GitHub, GitLab APIs, etc. - -Transformation Rules Required - -This metric relies on the deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as deployments. - -SQL Queries - -If you want to measure the monthly trend of deployment count as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/deployment-frequency-monthly.jpeg) - -``` -with _deployments as ( --- get the deployment count each month - SELECT - date_format(finished_date,'%y/%m') as month, - COUNT(distinct id) AS deployment_count - FROM - cicd_tasks - WHERE - type = 'DEPLOYMENT' - and result = 'SUCCESS' - GROUP BY 1 -), - -_calendar_months as( --- deal with the month with no deployments - SELECT date_format(CAST((SYSDATE()-INTERVAL (month_index) MONTH) AS date), '%y/%m') as month - FROM ( SELECT 0 month_index - UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 - UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 - UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 - UNION ALL SELECT 10 UNION ALL SELECT 11 - ) month_index - WHERE (SYSDATE()-INTERVAL (month_index) MONTH) > SYSDATE()-INTERVAL 6 MONTH -) - -SELECT - cm.month, - case when d.deployment_count is null then 0 else d.deployment_count end as deployment_count -FROM - _calendar_months cm - left join _deployments d on cm.month = d.month -ORDER BY 1 -``` - -If you want to measure in which category your team falls into as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/deployment-frequency-text.jpeg) - -``` -with last_few_calendar_months as( --- get the last few months within the selected time period in the top-right corner - SELECT CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) day - FROM ( SELECT 0 H - UNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300 - ) H CROSS JOIN ( SELECT 0 T - UNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30 - UNION ALL SELECT 40 UNION ALL SELECT 50 UNION ALL SELECT 60 - UNION ALL SELECT 70 UNION ALL SELECT 80 UNION ALL SELECT 90 - ) T CROSS JOIN ( SELECT 0 U - UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 - UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 - UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 - ) U - WHERE - (SYSDATE()-INTERVAL (H+T+U) DAY) > $__timeFrom() -), - -_days_weeks_deploy as( - SELECT - date(DATE_ADD(last_few_calendar_months.day, INTERVAL -WEEKDAY(last_few_calendar_months.day) DAY)) as week, - MAX(if(deployments.day is not null, 1, 0)) as week_deployed, - COUNT(distinct deployments.day) as days_deployed - FROM - last_few_calendar_months - LEFT JOIN( - SELECT - DATE(finished_date) AS day, - id - FROM cicd_tasks - WHERE - type = 'DEPLOYMENT' - and result = 'SUCCESS') deployments ON deployments.day = last_few_calendar_months.day - GROUP BY week - ), - -_monthly_deploy as( - SELECT - date(DATE_ADD(last_few_calendar_months.day, INTERVAL -DAY(last_few_calendar_months.day)+1 DAY)) as month, - MAX(if(deployments.day is not null, 1, 0)) as months_deployed - FROM - last_few_calendar_months - LEFT JOIN( - SELECT - DATE(finished_date) AS day, - id - FROM cicd_tasks - WHERE - type = 'DEPLOYMENT' - and result = 'SUCCESS') deployments ON deployments.day = last_few_calendar_months.day - GROUP BY month - ), - -_median_number_of_deployment_days_per_week as ( - SELECT x.days_deployed as median_number_of_deployment_days_per_week from _days_weeks_deploy x, _days_weeks_deploy y - GROUP BY x.days_deployed - HAVING SUM(SIGN(1-SIGN(y.days_deployed-x.days_deployed)))/COUNT(*) > 0.5 - LIMIT 1 -), - -_median_number_of_deployment_days_per_month as ( - SELECT x.months_deployed as median_number_of_deployment_days_per_month from _monthly_deploy x, _monthly_deploy y - GROUP BY x.months_deployed - HAVING SUM(SIGN(1-SIGN(y.months_deployed-x.months_deployed)))/COUNT(*) > 0.5 - LIMIT 1 -) - -SELECT - CASE - WHEN median_number_of_deployment_days_per_week >= 3 THEN 'On-demand' - WHEN median_number_of_deployment_days_per_week >= 1 THEN 'Between once per week and once per month' - WHEN median_number_of_deployment_days_per_month >= 1 THEN 'Between once per month and once every 6 months' - ELSE 'Fewer than once per six months' END AS 'Deployment Frequency' -FROM _median_number_of_deployment_days_per_week, _median_number_of_deployment_days_per_month -``` - -## How to improve? -- Trunk development. Work in small batches and often merge their work into shared trunks. -- Integrate CI/CD tools for automated deployment -- Improve automated test coverage diff --git a/versioned_docs/version-v0.14/Metrics/IncidentAge.md b/versioned_docs/version-v0.14/Metrics/IncidentAge.md deleted file mode 100644 index 4cd5e60cbb5..00000000000 --- a/versioned_docs/version-v0.14/Metrics/IncidentAge.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Incident Age" -description: > - Incident Age -sidebar_position: 10 ---- - -## What is this metric? -The amount of time it takes a incident to fix. - -## Why is it important? -1. Help the team to establish an effective hierarchical response mechanism for incidents. Focus on the resolution of important problems in the backlog. -2. Improve team's and individual's incident fixing efficiency. Identify good/to-be-improved practices that affect incident age - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -This metric equals to `resolution_date` - `created_date` of issues in type "INCIDENT". - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-incident' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - - -## How to improve? -1. Observe the trend of incident age and locate the key reasons. -2. According to the severity level, type (business, functional classification), affected module, source of bugs, count and observe the length of incident age. \ No newline at end of file diff --git a/versioned_docs/version-v0.14/Metrics/IncidentCountPer1kLinesOfCode.md b/versioned_docs/version-v0.14/Metrics/IncidentCountPer1kLinesOfCode.md deleted file mode 100644 index 9ad92787780..00000000000 --- a/versioned_docs/version-v0.14/Metrics/IncidentCountPer1kLinesOfCode.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Incident Count per 1k Lines of Code" -description: > - Incident Count per 1k Lines of Code -sidebar_position: 13 ---- - -## What is this metric? -Amount of incidents per 1,000 lines of code. - -## Why is it important? -1. Defect drill-down analysis to inform the development of design and code review strategies and to improve the internal QA process -2. Assist teams to locate projects/modules with higher defect severity and density, and clean up technical debts -3. Analyze critical points, identify good/to-be-improved practices that affect defect count or defect rate, to reduce the amount of future defects - -## Which dashboard(s) does it exist in -N/A - - -## How is it calculated? -The number of incidents divided by total accumulated lines of code (additions + deletions) in the given data range. - -Data Sources Required - -This metric relies on -- issues collected from Jira, GitHub or TAPD. -- commits collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -This metric relies on -- "Issue type mapping" in Jira, GitHub or TAPD's transformation rules page to let DevLake know what type(s) of issues can be regarded as incidents. -- "PR-Issue Mapping" in GitHub, GitLab's transformation rules page to let DevLake know the bugs are fixed by which PR/MRs. - -## How to improve? -1. From the project or team dimension, observe the statistics on the total number of defects, the distribution of the number of defects in each severity level/type/owner, the cumulative trend of defects, and the change trend of the defect rate in thousands of lines, etc. -2. From version cycle dimension, observe the statistics on the cumulative trend of the number of defects/defect rate, which can be used to determine whether the growth rate of defects is slowing down, showing a flat convergence trend, and is an important reference for judging the stability of software version quality -3. From the time dimension, analyze the trend of the number of test defects, defect rate to locate the key items/key points -4. Evaluate whether the software quality and test plan are reasonable by referring to CMMI standard values diff --git a/versioned_docs/version-v0.14/Metrics/LeadTimeForChanges.md b/versioned_docs/version-v0.14/Metrics/LeadTimeForChanges.md deleted file mode 100644 index 0c8dfc764bf..00000000000 --- a/versioned_docs/version-v0.14/Metrics/LeadTimeForChanges.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: "DORA - Lead Time for Changes" -description: > - DORA - Lead Time for Changes -sidebar_position: 19 ---- - -## What is this metric? -The median amount of time for a commit to be deployed into production. - -## Why is it important? -This metric measures the time it takes to commit code to the production environment and reflects the speed of software delivery. A lower average change preparation time means that your team is efficient at coding and deploying your project. - -## Which dashboard(s) does it exist in -DORA dashboard. See [live demo](https://grafana-lake.demo.devlake.io/grafana/d/qNo8_0M4z/dora?orgId=1). - - -## How is it calculated? -This metric is calculated by the median cycle time of the PRs deployed in a time range. A PR's cycle time is equal to the time a PR was deployed minus the PR's first commit's authored_date. - -![](https://i.imgur.com/edtqmRE.png) - -See the picture above, there were three deployments in the last month: Deploy-1, Deploy-2 and Deploy-3. Six PRs were deployed during the same period. - - Median Lead Time for Changes = The median cycle time of PR-1, PR-2, PR-3, PR-4, PR-5, PR-6 - -The way to calculate PR cycle time: -- PR-1 cycle time = Deploy-1's finished_date - PR-1's first commit's authored_date -- PR-2 cycle time = Deploy-2's finished_date - PR-2's first commit's authored_date -- PR-3 cycle time = Deploy-2's finished_date - PR-3's first commit's authored_date -- PR-4 cycle time = Deploy-3's finished_date - PR-4's first commit's authored_date -- PR-5 cycle time = Deploy-3's finished_date - PR-5's first commit's authored_date -- PR-6 cycle time = Deploy-3's finished_date - PR-6's first commit's authored_date - -PR cycle time is pre-calculated when dora plugin is triggered. You can connect to DevLake's database and find it in the field `change_timespan` in [table.pull_requests](https://devlake.apache.org/docs/DataModels/DevLakeDomainLayerSchema/#pull_requests). - - -Below are the benchmarks for different development teams from Google's report. However, it's difficult to tell which group a team falls into when the team's median lead time for changes is `between one week and one month`. Therefore, DevLake provides its own benchmarks to address this problem: - -| Groups | Benchmarks | DevLake Benchmarks -| -----------------| -------------------------------------| --------------------------------| -| Elite performers | Less than one hour | Less than one hour | -| High performers | Between one day and one week | Less than one week | -| Medium performers| Between one month and six months | Between one week and six months | -| Low performers | More than six months | More than six months | - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on deployments collected in multiple ways: -- Open APIs of Jenkins, GitLab, GitHub, etc. -- Webhook for general CI tools. -- Releases and PR/MRs from GitHub, GitLab APIs, etc. - -Transformation Rules Required - -This metric relies on the deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as deployments. - -SQL Queries - -If you want to measure the monthly trend of median lead time for changes as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/lead-time-for-changes-monthly.jpeg) - -``` -with _pr_stats as ( --- get PRs' cycle lead time in each month - SELECT - pr.id, - date_format(pr.merged_date,'%y/%m') as month, - pr.change_timespan as pr_cycle_time - FROM - pull_requests pr - WHERE - pr.merged_date is not null - and pr.change_timespan is not null - and $__timeFilter(pr.merged_date) -), - -_find_median_clt_each_month as ( - SELECT x.month, x.pr_cycle_time as med_change_lead_time - FROM _pr_stats x JOIN _pr_stats y ON x.month = y.month - GROUP BY x.month, x.pr_cycle_time - HAVING SUM(SIGN(1-SIGN(y.pr_cycle_time-x.pr_cycle_time)))/COUNT(*) > 0.5 -), - -_find_clt_rank_each_month as ( - SELECT - *, - rank() over(PARTITION BY month ORDER BY med_change_lead_time) as _rank - FROM - _find_median_clt_each_month -), - -_clt as ( - SELECT - month, - med_change_lead_time - from _find_clt_rank_each_month - WHERE _rank = 1 -), - -_calendar_months as( --- to deal with the month with no incidents - SELECT date_format(CAST((SYSDATE()-INTERVAL (month_index) MONTH) AS date), '%y/%m') as month - FROM ( SELECT 0 month_index - UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 - UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 - UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 - UNION ALL SELECT 10 UNION ALL SELECT 11 - ) month_index - WHERE (SYSDATE()-INTERVAL (month_index) MONTH) > SYSDATE()-INTERVAL 6 MONTH -) - -SELECT - cm.month, - case - when _clt.med_change_lead_time is null then 0 - else _clt.med_change_lead_time/60 end as med_change_lead_time_in_hour -FROM - _calendar_months cm - left join _clt on cm.month = _clt.month -ORDER BY 1 -``` - -If you want to measure in which category your team falls into as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/lead-time-for-changes-text.jpeg) - -``` -with _pr_stats as ( --- get PRs' cycle time in the selected period - SELECT - pr.id, - pr.change_timespan as pr_cycle_time - FROM - pull_requests pr - WHERE - pr.merged_date is not null - and pr.change_timespan is not null - and $__timeFilter(pr.merged_date) -), - -_median_change_lead_time as ( --- use median PR cycle time as the median change lead time - SELECT x.pr_cycle_time as median_change_lead_time from _pr_stats x, _pr_stats y - GROUP BY x.pr_cycle_time - HAVING SUM(SIGN(1-SIGN(y.pr_cycle_time-x.pr_cycle_time)))/COUNT(*) > 0.5 - LIMIT 1 -) - -SELECT - CASE - WHEN median_change_lead_time < 60 then "Less than one hour" - WHEN median_change_lead_time < 7 * 24 * 60 then "Less than one week" - WHEN median_change_lead_time < 180 * 24 * 60 then "Between one week and six months" - ELSE "More than six months" - END as median_change_lead_time -FROM _median_change_lead_time -``` - -## How to improve? -- Break requirements into smaller, more manageable deliverables -- Optimize the code review process -- "Shift left", start QA early and introduce more automated tests -- Integrate CI/CD tools to automate the deployment process diff --git a/versioned_docs/version-v0.14/Metrics/MTTR.md b/versioned_docs/version-v0.14/Metrics/MTTR.md deleted file mode 100644 index 8fa33fb6b91..00000000000 --- a/versioned_docs/version-v0.14/Metrics/MTTR.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: "DORA - Median Time to Restore Service" -description: > - DORA - Median Time to Restore Service -sidebar_position: 20 ---- - -## What is this metric? -The time to restore service after service incidents, rollbacks, or any type of production failure happened. - -## Why is it important? -This metric is essential to measure the disaster control capability of your team and the robustness of the software. - -## Which dashboard(s) does it exist in -DORA dashboard. See [live demo](https://grafana-lake.demo.devlake.io/grafana/d/qNo8_0M4z/dora?orgId=1). - - -## How is it calculated? -MTTR = Total [incident age](./IncidentAge.md) (in hours)/number of incidents. - -If you have three incidents that happened in the given data range, one lasting 1 hour, one lasting 2 hours and one lasting 3 hours. Your MTTR will be: (1 + 2 + 3) / 3 = 2 hours. - -Below are the benchmarks for different development teams from Google's report. However, it's difficult to tell which group a team falls into when the team's median time to restore service is `between one week and six months`. Therefore, DevLake provides its own benchmarks to address this problem: - -| Groups | Benchmarks | DevLake Benchmarks -| -----------------| -------------------------------------| -------------------------------| -| Elite performers | Less than one hour | Less than one hour | -| High performers | Less one day | Less than one day | -| Medium performers| Between one day and one week | Between one day and one week | -| Low performers | More than six months | More than one week | - -Source: 2021 Accelerate State of DevOps, Google
- -Data Sources Required - -This metric relies on: -- `Deployments` collected in one of the following ways: - - Open APIs of Jenkins, GitLab, GitHub, etc. - - Webhook for general CI tools. - - Releases and PR/MRs from GitHub, GitLab APIs, etc. -- `Incidents` collected in one of the following ways: - - Issue tracking tools such as Jira, TAPD, GitHub, etc. - - Incident or Service Monitoring tools such as PagerDuty, ServiceNow, etc. - -Transformation Rules Required - -This metric relies on: -- Deployment configuration in Jenkins, GitLab or GitHub transformation rules to let DevLake know what CI builds/jobs can be regarded as `Deployments`. -- Incident configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Incidents`. - -SQL Queries - -If you want to measure the monthly trend of median time to restore service as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/mttr-monthly.jpeg) - -``` -with _incidents as ( --- get the incident count each month - SELECT - date_format(created_date,'%y/%m') as month, - cast(lead_time_minutes as signed) as lead_time_minutes - FROM - issues - WHERE - type = 'INCIDENT' -), - -_find_median_mttr_each_month as ( - SELECT - x.* - from _incidents x join _incidents y on x.month = y.month - WHERE x.lead_time_minutes is not null and y.lead_time_minutes is not null - GROUP BY x.month, x.lead_time_minutes - HAVING SUM(SIGN(1-SIGN(y.lead_time_minutes-x.lead_time_minutes)))/COUNT(*) > 0.5 -), - -_find_mttr_rank_each_month as ( - SELECT - *, - rank() over(PARTITION BY month ORDER BY lead_time_minutes) as _rank - FROM - _find_median_mttr_each_month -), - -_mttr as ( - SELECT - month, - lead_time_minutes as med_time_to_resolve - from _find_mttr_rank_each_month - WHERE _rank = 1 -), - -_calendar_months as( --- deal with the month with no incidents - SELECT date_format(CAST((SYSDATE()-INTERVAL (month_index) MONTH) AS date), '%y/%m') as month - FROM ( SELECT 0 month_index - UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 - UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 - UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 - UNION ALL SELECT 10 UNION ALL SELECT 11 - ) month_index - WHERE (SYSDATE()-INTERVAL (month_index) MONTH) > SYSDATE()-INTERVAL 6 MONTH -) - -SELECT - cm.month, - case - when m.med_time_to_resolve is null then 0 - else m.med_time_to_resolve/60 end as med_time_to_resolve_in_hour -FROM - _calendar_months cm - left join _mttr m on cm.month = m.month -ORDER BY 1 -``` - -If you want to measure in which category your team falls into as the picture shown below, run the following SQL in Grafana. - -![](/img/Metrics/mttr-text.jpeg) - -``` -with _incidents as ( --- get the incidents created within the selected time period in the top-right corner - SELECT - cast(lead_time_minutes as signed) as lead_time_minutes - FROM - issues - WHERE - type = 'INCIDENT' - and $__timeFilter(created_date) -), - -_median_mttr as ( - SELECT - x.lead_time_minutes as med_time_to_resolve - from _incidents x, _incidents y - WHERE x.lead_time_minutes is not null and y.lead_time_minutes is not null - GROUP BY x.lead_time_minutes - HAVING SUM(SIGN(1-SIGN(y.lead_time_minutes-x.lead_time_minutes)))/COUNT(*) > 0.5 - LIMIT 1 -) - -SELECT - case - WHEN med_time_to_resolve < 60 then "Less than one hour" - WHEN med_time_to_resolve < 24 * 60 then "Less than one Day" - WHEN med_time_to_resolve < 7 * 24 * 60 then "Between one day and one week" - ELSE "More than one week" - END as med_time_to_resolve -FROM - _median_mttr -``` - -## How to improve? -- Use automated tools to quickly report failure -- Prioritize recovery when a failure happens -- Establish a go-to action plan to respond to failures immediately -- Reduce the deployment time for failure-fixing diff --git a/versioned_docs/version-v0.14/Metrics/MergeRate.md b/versioned_docs/version-v0.14/Metrics/MergeRate.md deleted file mode 100644 index c8c274338c9..00000000000 --- a/versioned_docs/version-v0.14/Metrics/MergeRate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "PR Merge Rate" -description: > - Pull Request Merge Rate -sidebar_position: 12 ---- - -## What is this metric? -The ratio of PRs/MRs that get merged. - -## Why is it important? -1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- GitLab -- Weekly Community Retro -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -The number of merged PRs divided by the number of all PRs in the given data range. - -Data Sources Required - -This metric relies on PRs/MRs collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - - -## How to improve? -1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. diff --git a/versioned_docs/version-v0.14/Metrics/PRCount.md b/versioned_docs/version-v0.14/Metrics/PRCount.md deleted file mode 100644 index 4521e78617a..00000000000 --- a/versioned_docs/version-v0.14/Metrics/PRCount.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Pull Request Count" -description: > - Pull Request Count -sidebar_position: 11 ---- - -## What is this metric? -The number of pull requests created. - -## Why is it important? -1. Code review metrics are process indicators to provide quick feedback on developers' code quality -2. Promote the team to establish a unified coding specification and standardize the code review criteria -3. Identify modules with low-quality risks in advance, optimize practices, and precipitate into reusable knowledge and tools to avoid technical debt accumulation - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- GitLab -- Weekly Community Retro -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is calculated by counting the number of PRs in the given data range. - -Data Sources Required - -This metric relies on PRs/MRs collected from GitHub, GitLab or BitBucket. - -Transformation Rules Required - -N/A - -## How to improve? -1. From the developer dimension, we evaluate the code quality of developers by combining the task complexity with the metrics related to the number of review passes and review rounds. -2. From the reviewer dimension, we observe the reviewer's review style by taking into account the task complexity, the number of passes and the number of review rounds. -3. From the project/team dimension, we combine the project phase and team task complexity to aggregate the metrics related to the number of review passes and review rounds, and identify the modules with abnormal code review process and possible quality risks. diff --git a/versioned_docs/version-v0.14/Metrics/PRSize.md b/versioned_docs/version-v0.14/Metrics/PRSize.md deleted file mode 100644 index bf6a87d82d9..00000000000 --- a/versioned_docs/version-v0.14/Metrics/PRSize.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "PR Size" -description: > - PR Size -sidebar_position: 2 ---- - -## What is this metric? -The average code changes (in Lines of Code) of PRs in the selected time range. - -## Why is it important? -Small PRs can reduce risks of introducing new bugs and increase code review quality, as problems may often be hidden in big chuncks of code and difficult to identify. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is calculated by counting the total number of code changes (in LOC) divided by the total number of PRs in the selected time range. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Divide coding tasks into workable and manageable pieces; -1. Encourage developers to submit small PRs and only keep related changes in the same PR. diff --git a/versioned_docs/version-v0.14/Metrics/PickupTime.md b/versioned_docs/version-v0.14/Metrics/PickupTime.md deleted file mode 100644 index 07242ae772b..00000000000 --- a/versioned_docs/version-v0.14/Metrics/PickupTime.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "PR Pickup Time" -description: > - PR Pickup Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is issued until the first comment is added to that PR. - -## Why is it important? -PR Pickup Time shows how engaged your team is in collaborative work by identifying the delay in picking up PRs. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboard to monitor your delivery progress; -2. Have a habit to check for hanging PRs regularly; -3. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued. diff --git a/versioned_docs/version-v0.14/Metrics/RequirementCount.md b/versioned_docs/version-v0.14/Metrics/RequirementCount.md deleted file mode 100644 index e9a6bd32981..00000000000 --- a/versioned_docs/version-v0.14/Metrics/RequirementCount.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "Requirement Count" -description: > - Requirement Count -sidebar_position: 2 ---- - -## What is this metric? -The number of delivered requirements or features. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -This metric is calculated by counting the number of delivered issues in type "REQUIREMENT" in the given data range. - -Data Sources Required - -This metric relies on the issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - -SQL Queries - -If you want to see a single count, run the following SQL in Grafana -``` - select - count(*) as "Requirement Count" - from issues i - join board_issues bi on i.id = bi.issue_id - where - i.type = 'REQUIREMENT' - and i.status = 'DONE' - -- this is the default variable in Grafana - and $__timeFilter(i.created_date) - and bi.board_id in ($board_id) -``` - -If you want to see the monthly trend, run the following SQL -``` - SELECT - DATE_ADD(date(i.created_date), INTERVAL -DAYOFMONTH(date(i.created_date))+1 DAY) as time, - count(distinct case when status != 'DONE' then i.id else null end) as "Number of Open Issues", - count(distinct case when status = 'DONE' then i.id else null end) as "Number of Delivered Issues" - FROM issues i - join board_issues bi on i.id = bi.issue_id - join boards b on bi.board_id = b.id - WHERE - i.type = 'REQUIREMENT' - and i.status = 'DONE' - and $__timeFilter(i.created_date) - and bi.board_id in ($board_id) - GROUP by 1 -``` - -## How to improve? -1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process. -2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. -3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. -4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. diff --git a/versioned_docs/version-v0.14/Metrics/RequirementDeliveryRate.md b/versioned_docs/version-v0.14/Metrics/RequirementDeliveryRate.md deleted file mode 100644 index eb0a03133d5..00000000000 --- a/versioned_docs/version-v0.14/Metrics/RequirementDeliveryRate.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Requirement Delivery Rate" -description: > - Requirement Delivery Rate -sidebar_position: 3 ---- - -## What is this metric? -The ratio of delivered requirements to all requirements. - -## Why is it important? -1. Based on historical data, establish a baseline of the delivery capacity of a single iteration to improve the organization and planning of R&D resources. -2. Evaluate whether the delivery capacity matches the business phase and demand scale. Identify key bottlenecks and reasonably allocate resources. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -The number of delivered requirements divided by the total number of requirements in the given data range. - -Data Sources Required - -This metric relies on the issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the number of requirements and delivery rate of different time cycles to find the stability and trend of the development process. -2. Analyze and compare the number of requirements delivered and delivery rate of each project/team, and compare the scale of requirements of different projects. -3. Based on historical data, establish a baseline of the delivery capacity of a single iteration (optimistic, probable and pessimistic values) to provide a reference for iteration estimation. -4. Drill down to analyze the number and percentage of requirements in different phases of SDLC. Analyze rationality and identify the requirements stuck in the backlog. diff --git a/versioned_docs/version-v0.14/Metrics/RequirementGranularity.md b/versioned_docs/version-v0.14/Metrics/RequirementGranularity.md deleted file mode 100644 index 03bb91767f5..00000000000 --- a/versioned_docs/version-v0.14/Metrics/RequirementGranularity.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Requirement Granularity" -description: > - Requirement Granularity -sidebar_position: 5 ---- - -## What is this metric? -The average number of story points per requirement. - -## Why is it important? -1. Promote product teams to split requirements carefully, improve requirements quality, help developers understand requirements clearly, deliver efficiently and with high quality, and improve the project management capability of the team. -2. Establish a data-supported workload estimation model to help R&D teams calibrate their estimation methods and more accurately assess the granularity of requirements, which is useful to achieve better issue planning in project management. - -## Which dashboard(s) does it exist in -- Jira -- GitHub - - -## How is it calculated? -The average story points of issues in type "REQUIREMENT" in the given data range. - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the story points/requirement lead time of requirements to evaluate whether the ticket size, ie. requirement complexity is optimal. -2. Compare the estimated requirement granularity with the actual situation and evaluate whether the difference is reasonable by combining more microscopic workload metrics (e.g. lines of code/code equivalents) diff --git a/versioned_docs/version-v0.14/Metrics/RequirementLeadTime.md b/versioned_docs/version-v0.14/Metrics/RequirementLeadTime.md deleted file mode 100644 index 74061d63dec..00000000000 --- a/versioned_docs/version-v0.14/Metrics/RequirementLeadTime.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Requirement Lead Time" -description: > - Requirement Lead Time -sidebar_position: 4 ---- - -## What is this metric? -The amount of time it takes a requirement to deliver. - -## Why is it important? -1. Analyze key projects and critical points, identify good/to-be-improved practices that affect requirement lead time, and reduce the risk of delays -2. Focus on the end-to-end velocity of value delivery process; coordinate different parts of R&D to avoid efficiency shafts; make targeted improvements to bottlenecks. - -## Which dashboard(s) does it exist in -- Jira -- GitHub -- Community Experience - - -## How is it calculated? -This metric equals to `resolution_date` - `created_date` of issues in type "REQUIREMENT". - -Data Sources Required - -This metric relies on issues collected from Jira, GitHub, or TAPD. - -Transformation Rules Required - -This metric relies on the 'type-requirement' configuration in Jira, GitHub or TAPD transformation rules to let DevLake know what CI builds/jobs can be regarded as `Requirements`. - - -## How to improve? -1. Analyze the trend of requirement lead time to observe if it has improved over time. -2. Analyze and compare the requirement lead time of each project/team to identify key projects with abnormal lead time. -3. Drill down to analyze a requirement's staying time in different phases of SDLC. Analyze the bottleneck of delivery velocity and improve the workflow. \ No newline at end of file diff --git a/versioned_docs/version-v0.14/Metrics/ReviewDepth.md b/versioned_docs/version-v0.14/Metrics/ReviewDepth.md deleted file mode 100644 index 59bcfbe876c..00000000000 --- a/versioned_docs/version-v0.14/Metrics/ReviewDepth.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "PR Review Depth" -description: > - PR Review Depth -sidebar_position: 2 ---- - -## What is this metric? -The average number of comments of PRs in the selected time range. - -## Why is it important? -PR Review Depth (in Comments per RR) is related to the quality of code review, indicating how thorough your team reviews PRs. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - -## How is it calculated? -This metric is calculated by counting the total number of PR comments divided by the total number of PRs in the selected time range. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Encourage multiple reviewers to review a PR; -2. Review Depth is an indicator for generally how thorough your PRs are reviewed, but it does not mean the deeper the better. In some cases, spending an excessive amount of resources on reviewing PRs is also not recommended. \ No newline at end of file diff --git a/versioned_docs/version-v0.14/Metrics/ReviewTime.md b/versioned_docs/version-v0.14/Metrics/ReviewTime.md deleted file mode 100644 index 8cfe080b0cc..00000000000 --- a/versioned_docs/version-v0.14/Metrics/ReviewTime.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "PR Review Time" -description: > - PR Review Time -sidebar_position: 2 ---- - -## What is this metric? -The time it takes to complete a code review of a PR before it gets merged. - -## Why is it important? -Code review should be conducted almost in real-time and usually take less than two days. Abnormally long PR Review Time may indicate one or more of the following problems: -1. The PR size is too large that makes it difficult to review. -2. The team is too busy to review code. - -## Which dashboard(s) does it exist in? -- Engineering Throughput and Cycle Time -- Engineering Throughput and Cycle Time - Team View - - -## How is it calculated? -This metric is the time frame between when the first comment is added to a PR, to when the PR is merged. - -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboards to monitor your delivery progress; -2. Use automated tests for the initial work; -3. Reduce PR size; -4. Analyze the causes for long reviews. \ No newline at end of file diff --git a/versioned_docs/version-v0.14/Metrics/TimeToMerge.md b/versioned_docs/version-v0.14/Metrics/TimeToMerge.md deleted file mode 100644 index 04a39225fe0..00000000000 --- a/versioned_docs/version-v0.14/Metrics/TimeToMerge.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "PR Time To Merge" -description: > - PR Time To Merge -sidebar_position: 2 ---- - -## What is this metric? -The time it takes from when a PR is issued to when it is merged. Essentially, PR Time to Merge = PR Pickup Time + PR Review Time. - -## Why is it important? -The delay of reviewing and waiting to review PRs has large impact on delivery speed, while reasonably short PR Time to Merge can indicate frictionless teamwork. Improving on this metric is the key to reduce PR cycle time. - -## Which dashboard(s) does it exist in? -- GitHub Basic Metrics -- Bi-weekly Community Retro - - -## How is it calculated? -Data Sources Required - -This metric relies on PR/MRs collected from GitHub or GitLab. - -Transformation Rules Required - -N/A - -SQL Queries - - -## How to improve? -1. Use DevLake's dashboards to monitor your delivery progress; -2. Have a habit to check for hanging PRs regularly; -3. Set up alerts for your communication tools (e.g. Slack, Lark) when new PRs are issued; -4. Reduce PR size; -5. Analyze the causes for long reviews. diff --git a/versioned_docs/version-v0.14/Metrics/_category_.json b/versioned_docs/version-v0.14/Metrics/_category_.json deleted file mode 100644 index e944147d528..00000000000 --- a/versioned_docs/version-v0.14/Metrics/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Metrics", - "position": 5, - "link":{ - "type": "generated-index", - "slug": "Metrics" - } -} diff --git a/versioned_docs/version-v0.14/Overview/Architecture.md b/versioned_docs/version-v0.14/Overview/Architecture.md deleted file mode 100755 index 47bd4b48e03..00000000000 --- a/versioned_docs/version-v0.14/Overview/Architecture.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Architecture" -description: > - Understand the architecture of Apache DevLake -sidebar_position: 2 ---- - -## Overview - - -DevLake Components
- -A DevLake installation typically consists of the following components: - -- Config UI: A handy user interface to create, trigger, and debug Blueprints. A Blueprint specifies the where (data connection), what (data scope), how (transformation rule), and when (sync frequency) of a data pipeline. -- API Server: The main programmatic interface of DevLake. -- Runner: The runner does all the heavy-lifting for executing tasks. In the default DevLake installation, it runs within the API Server, but DevLake provides a temporal-based runner (beta) for production environments. -- Database: The database stores both DevLake's metadata and user data collected by data pipelines. DevLake supports MySQL and PostgreSQL as of v0.11. -- Plugins: Plugins enable DevLake to collect and analyze dev data from any DevOps tools with an accessible API. DevLake community is actively adding plugins for popular DevOps tools, but if your preferred tool is not covered yet, feel free to open a GitHub issue to let us know or check out our doc on how to build a new plugin by yourself. -- Dashboards: Dashboards deliver data and insights to DevLake users. A dashboard is simply a collection of SQL queries along with corresponding visualization configurations. DevLake's official dashboard tool is Grafana and pre-built dashboards are shipped in Grafana's JSON format. Users are welcome to swap for their own choice of dashboard/BI tool if desired. - -## Dataflow - - -DevLake Dataflow
- -A typical plugin's dataflow is illustrated below: - -1. The Raw layer stores the API responses from data sources (DevOps tools) in JSON. This saves developers' time if the raw data is to be transformed differently later on. Please note that communicating with data sources' APIs is usually the most time-consuming step. -2. The Tool layer extracts raw data from JSONs into a relational schema that's easier to consume by analytical tasks. Each DevOps tool would have a schema that's tailored to their data structure, hence the name, the Tool layer. -3. The Domain layer attempts to build a layer of abstraction on top of the Tool layer so that analytics logics can be re-used across different tools. For example, GitHub's Pull Request (PR) and GitLab's Merge Request (MR) are similar entities. They each have their own table name and schema in the Tool layer, but they're consolidated into a single entity in the Domain layer, so that developers only need to implement metrics like Cycle Time and Code Review Rounds once against the domain layer schema. - -## Principles - -1. Extensible: DevLake's plugin system allows users to integrate with any DevOps tool. DevLake also provides a dbt plugin that enables users to define their own data transformation and analysis workflows. -2. Portable: DevLake has a modular design and provides multiple options for each module. Users of different setups can freely choose the right configuration for themselves. -3. Robust: DevLake provides an SDK to help plugins efficiently and reliably collect data from data sources while respecting their API rate limits and constraints. - -