This is an automated email from the ASF dual-hosted git repository.
likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 9743749d2 Update Engineering Throughput and Cycle Time Dashboard
(#4179)
9743749d2 is described below
commit 9743749d21f0cfca255466bd6d39940df44f7e16
Author: Louis.z <[email protected]>
AuthorDate: Tue Jan 10 20:58:16 2023 +0800
Update Engineering Throughput and Cycle Time Dashboard (#4179)
* fix: home dashboard link and zentao dashboard
* fix: update the homepage dashboard link
* fix: fix cycle time dashboard
Co-authored-by: Startrekzky <[email protected]>
---
.../EngineeringThroughputAndCycleTime.json | 177 ++++++++++++++++++---
.../EngineeringThroughputAndCycleTimeTeamView.json | 161 +++++++++++++++++--
2 files changed, 304 insertions(+), 34 deletions(-)
diff --git a/grafana/dashboards/EngineeringThroughputAndCycleTime.json
b/grafana/dashboards/EngineeringThroughputAndCycleTime.json
index d6544996b..fda15fbfb 100644
--- a/grafana/dashboards/EngineeringThroughputAndCycleTime.json
+++ b/grafana/dashboards/EngineeringThroughputAndCycleTime.json
@@ -15,8 +15,8 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
- "id": 4,
- "iteration": 1673270412454,
+ "id": 11,
+ "iteration": 1673349403459,
"links": [],
"panels": [
{
@@ -987,7 +987,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_cycle_time/60 as cycle_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n GROUP
BY 1,2,3\n)\n\nSELECT \n DATE_ADD(date(pr_issued_date), INTERVAL
-DAYOFMONTH(date(pr_issued_date))+1 DAY) as time,\n av [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no cycle_time to make
sure cycle_time equals the sum of the four metrics
below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests
pr\n left join project_pr_metrics prm on pr.id = prm.id\n join
project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pr.created_date >= DATE_ADD(DAT [...]
"refId": "A",
"select": [
[
@@ -1011,7 +1011,7 @@
]
}
],
- "title": "Total Cycle Time",
+ "title": "PR Cycle Time",
"type": "timeseries"
},
{
@@ -1066,11 +1066,11 @@
},
"gridPos": {
"h": 7,
- "w": 8,
+ "w": 6,
"x": 0,
"y": 33
},
- "id": 104,
+ "id": 120,
"options": {
"legend": {
"calcs": [
@@ -1091,7 +1091,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_coding_time/60 as coding_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n GROUP
BY 1,2,3\n)\n\nSELECT \n DATE_ADD(date(pr_issued_date), INTERVAL
-$interval(date(pr_issued_date))+1 DAY) as time,\n a [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no coding_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as coding_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pr.created_date >= DATE_ADD(DA [...]
"refId": "A",
"select": [
[
@@ -1115,7 +1115,7 @@
]
}
],
- "title": "Coding Time(h)",
+ "title": "PR Coding Time",
"type": "timeseries"
},
{
@@ -1201,11 +1201,11 @@
},
"gridPos": {
"h": 7,
- "w": 8,
- "x": 8,
+ "w": 6,
+ "x": 6,
"y": 33
},
- "id": 105,
+ "id": 117,
"options": {
"legend": {
"calcs": [
@@ -1226,7 +1226,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_pickup_time/60 as pickup_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n GROUP
BY 1,2,3\n)\n\nSELECT \n DATE_ADD(date(pr_issued_date), INTERVAL
-$interval(date(pr_issued_date))+1 DAY) as time,\n a [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no pickup_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as pickup_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pr.created_date >= DATE_ADD(DA [...]
"refId": "A",
"select": [
[
@@ -1250,7 +1250,7 @@
]
}
],
- "title": "Pickup Time",
+ "title": "PR Pickup Time",
"type": "timeseries"
},
{
@@ -1336,11 +1336,11 @@
},
"gridPos": {
"h": 7,
- "w": 8,
- "x": 16,
+ "w": 6,
+ "x": 12,
"y": 33
},
- "id": 107,
+ "id": 118,
"options": {
"legend": {
"calcs": [
@@ -1361,7 +1361,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_review_time/60 as review_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n GROUP
BY 1,2,3\n)\n\nSELECT \n DATE_ADD(date(pr_issued_date), INTERVAL
-$interval(date(pr_issued_date))+1 DAY) as time,\n a [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no review_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as review_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pr.created_date >= DATE_ADD(DA [...]
"refId": "A",
"select": [
[
@@ -1385,7 +1385,142 @@
]
}
],
- "title": "Review Time",
+ "title": "PR Review Time",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 12,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Opened"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Merged"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 33
+ },
+ "id": 119,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean"
+ ],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no deploy_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as deploy_time\n FROM
pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n WHERE\n
$__timeFilter(pr.created_date)\n and pr.created_date >= DATE_ADD(DA [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "PR Deploy Time",
"type": "timeseries"
},
{
@@ -1420,7 +1555,7 @@
{
"allValue": null,
"current": {
- "selected": false,
+ "selected": true,
"text": [
"Louis"
],
@@ -1448,7 +1583,7 @@
{
"allValue": "",
"current": {
- "selected": false,
+ "selected": true,
"text": [
"All"
],
@@ -1545,5 +1680,5 @@
"timezone": "",
"title": "Engineering Throughput and Cycle Time",
"uid": "Jaaimc67k",
- "version": 2
+ "version": 9
}
\ No newline at end of file
diff --git a/grafana/dashboards/EngineeringThroughputAndCycleTimeTeamView.json
b/grafana/dashboards/EngineeringThroughputAndCycleTimeTeamView.json
index 845502784..a1bfff206 100644
--- a/grafana/dashboards/EngineeringThroughputAndCycleTimeTeamView.json
+++ b/grafana/dashboards/EngineeringThroughputAndCycleTimeTeamView.json
@@ -15,8 +15,8 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
- "id": 20,
- "iteration": 1673318859459,
+ "id": 12,
+ "iteration": 1673353935665,
"links": [],
"panels": [
{
@@ -1890,7 +1890,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_cycle_time/60 as
cycle_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metrics prm on pr.id = prm.id\n left join user_accounts ua on
pr.author_id = ua.account_id\n left join users u on ua.user_id = u [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no cycle_time to make
sure cycle_time equals the sum of the four metrics
below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time,\n\t\tpr.author_id,\n
u.id as user_id,\n u.name as user_name,\n t.id as team_id,\n t.name
as team\n FROM pull_requests pr\n join project_mapping pm on
pr.base_repo_id = pm.row_id\n\t\tleft join project_pr_metri [...]
"refId": "A",
"select": [
[
@@ -2000,7 +2000,7 @@
},
"gridPos": {
"h": 7,
- "w": 8,
+ "w": 6,
"x": 0,
"y": 58
},
@@ -2025,7 +2025,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_coding_time/60 as
coding_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metrics prm on pr.id = prm.id\n left join user_accounts ua on
pr.author_id = ua.account_id\n left join users u on ua.user_id = [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no coding_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as
coding_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metr [...]
"refId": "A",
"select": [
[
@@ -2135,8 +2135,8 @@
},
"gridPos": {
"h": 7,
- "w": 8,
- "x": 8,
+ "w": 6,
+ "x": 6,
"y": 58
},
"id": 134,
@@ -2160,7 +2160,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_pickup_time/60 as
pickup_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metrics prm on pr.id = prm.id\n left join user_accounts ua on
pr.author_id = ua.account_id\n left join users u on ua.user_id = [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no pickup_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as
pickup_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metr [...]
"refId": "A",
"select": [
[
@@ -2270,8 +2270,8 @@
},
"gridPos": {
"h": 7,
- "w": 8,
- "x": 16,
+ "w": 6,
+ "x": 12,
"y": 58
},
"id": 135,
@@ -2295,7 +2295,142 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n\t\tprm.pr_review_time/60 as
review_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metrics prm on pr.id = prm.id\n left join user_accounts ua on
pr.author_id = ua.account_id\n left join users u on ua.user_id = [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no review_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as
review_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metr [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "PR Review Time(h)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 12,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Team1: Avg Review Time(h)"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "orange",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Team2: Avg Review Time(h)"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 58
+ },
+ "id": 145,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean"
+ ],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date
as pr_issued_date,\n -- convert null to 0 if a PR has no deploy_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as
deploy_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id\n\t\tleft join
project_pr_metr [...]
"refId": "A",
"select": [
[
@@ -2319,7 +2454,7 @@
]
}
],
- "title": "Review Time(h)",
+ "title": "PR Deploy Time(h)",
"type": "timeseries"
},
{
@@ -2674,5 +2809,5 @@
"timezone": "",
"title": "Engineering Throughput and Cycle Time - Team View",
"uid": "nJ1ijje7k",
- "version": 3
+ "version": 2
}
\ No newline at end of file