blob: 92e2fef5ee0c21e81e1d8c07073c7e43eee5b8fd [file] [log] [blame]
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 2,
"iteration": 1637051238473,
"links": [
{
"asDropdown": false,
"icon": "bolt",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": false,
"title": "Homepage",
"tooltip": "",
"type": "link",
"url": "/grafana/d/RXJZNpMnz/user-value-specific-dashboards-homepage?orgId=1"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": true,
"tags": [
"user_value"
],
"targetBlank": false,
"title": "Metric dashboards",
"tooltip": "",
"type": "dashboards",
"url": ""
}
],
"panels": [
{
"cacheTimeout": null,
"datasource": null,
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 0
},
"id": 46,
"interval": null,
"links": [],
"options": {
"content": "<div style=\"text-align:center;\">\n <div style=\"display:inline-block;text-align:center;padding-top:10px;\">\n <img border=\"0\" src=\"/grafana/public/img/lake/practice_process_delivery_quality.png\" alt=\"R&D Process\" width=\"50%\">\n </div>\n</div>",
"mode": "html"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": false,
"rawSql": "SELECT\n create_time AS \"time\",\n progress\nFROM ca_analysis\nWHERE\n $__timeFilter(create_time)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"progress"
],
"type": "column"
}
]
],
"table": "ca_analysis",
"timeColumn": "create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Charts are organized by the Research & Development stages below",
"transparent": true,
"type": "text"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 6
},
"id": 48,
"options": {
"content": "<div style=\"display: block;text-align: center;margin-top: 56px;\">\n <div style=\"display: inline-flex;\">\n <img src=\"/public/img/lake/1.png\" alt=\"No.1\" width=\"56\">\n <p style=\"font-size:24px; margin:10px; color:#BFC1C8;\"><b>Development<b></b></b></p><b><b>\n </div>\n</div>",
"mode": "html"
},
"pluginVersion": "8.0.6",
"targets": [
{
"queryType": "randomWalk",
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": "mysql",
"description": "1. Total number of Pull/Merge request created.\n2. The PR/MR being calculated are filtered by \"PR/MR creation time\" (time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 10
},
"id": 4,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS \"time\",\n count(*) as value\nFROM \n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\ngroup by 1\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"progress"
],
"type": "column"
}
]
],
"table": "ca_analysis",
"timeColumn": "create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Pull Request Count",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Total number of Pull/Merge request merged.\n2. The PR/MR being calculated are filtered by \"PR/MR creation time\" (time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 8,
"y": 10
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "SELECT\n now() as time,\n count(*) as value\nFROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n jbgp.jira_board_id = $board_id\n and state = 'merged'\n and $__timeFilter(gitlab_created_at)\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Pull Request Pass Count",
"type": "stat"
},
{
"datasource": "mysql",
"description": "Pull Request Pass Count/Pull Request Count",
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 0.8
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 16,
"y": 10
},
"id": 37,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "SELECT\n now() as time,\n 1.0 * count(case when state = 'merged' then 1 else null end)/count(*)\nFROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Pull Request Pass Rate (%)",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Pull Request Pass Rate over time.\n2. The time granularity can be switched to week or month by \"Time Interval\" above. \n3. When Time Interval is set to \"month\", value \"pull_request_pass_rate\" of \"2021-06-01\" calculates the PR/MR whose creation time falls under [2020-06-01, 2020-07-01)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Rate(%)",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 16
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with _mr_request_rate as(\n SELECT\n DATE_ADD(date(gitlab_created_at), INTERVAL -$interval(date(gitlab_created_at))+1 DAY) as time,\n state\n FROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\n WHERE\n jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\n)\n\nSELECT \n timestamp(time) as time,\n 1.0 * count(case when state = 'merged' then 1 else null end)/count(*) as \"Pull Request Pass Rate\"\nFROM _mr_request_rate\nGROUP BY 1\nORDER BY 1\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Pull Request Pass Rate over Time",
"type": "timeseries"
},
{
"datasource": "mysql",
"description": "The average round of PR/MR review.",
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 22
},
"id": 53,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS \"time\",\n avg(review_rounds) as value\nFROM \n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n state = 'merged'\n and review_rounds > 0\n and jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\ngroup by 1\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"progress"
],
"type": "column"
}
]
],
"table": "ca_analysis",
"timeColumn": "create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Average Pull Request Review Round",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Avg PR/MR Review Round over time.\n2. The time granularity can be switched to week or month by \"Time Interval\" above. \n3. When Time Interval is set to \"month\", value \"Avg Pull Request Review Round\" of \"2021-06-01\" calculates the PR/MR whose creation time falls under [2020-06-01, 2020-07-01)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Rate(%)",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 22
},
"id": 55,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "SELECT\n timestamp(DATE_ADD(date(gitlab_created_at), INTERVAL -$interval(date(gitlab_created_at))+1 DAY)) as time,\n avg(review_rounds) as \"Pull Request Reveiw Round\"\nFROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n state = 'merged'\n and review_rounds > 0\n and jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\nGROUP BY 1\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Average Pull Request Review Round over Time",
"type": "timeseries"
},
{
"datasource": "mysql",
"description": "The average round of PR/MR review of PR authors.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 28
},
"id": 54,
"options": {
"barWidth": 0.52,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS \"time\",\n author_username as Author,\n avg(review_rounds) as value\nFROM \n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\nWHERE\n state = 'merged'\n and review_rounds > 0\n and jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\nGROUP BY 1,2\nORDER BY 3 desc\nlimit 20",
"refId": "A",
"select": [
[
{
"params": [
"progress"
],
"type": "column"
}
]
],
"table": "ca_analysis",
"timeColumn": "create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Average Pull Request Review Round by Author",
"type": "barchart"
},
{
"datasource": "mysql",
"description": "One-time pass rate for PR over time.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "One-time Pass Rate(%)",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 34
},
"id": 56,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with _review_rounds as(\n SELECT\n DATE_ADD(date(gitlab_created_at), INTERVAL -$interval(date(gitlab_created_at))+1 DAY) as time,\n review_rounds\n FROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.gitlab_project_id = gmr.project_id\n WHERE\n state = 'merged'\n and review_rounds > 0\n and jbgp.jira_board_id = $board_id\n and $__timeFilter(gitlab_created_at)\n)\n\nSELECT \n timestamp(time) as time,\n count(case when review_rounds = 1 then true else null end)/count(*) as one_time_pass_rate\nFROM \n _review_rounds\nGROUP BY 1\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "One-time Pass Rate for Code Reviews over Time",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 40
},
"id": 50,
"options": {
"content": "<div style=\"display: block;text-align: center;margin-top: 56px;\">\n <div style=\"display: inline-flex;\">\n <img src=\"/public/img/lake/2.png\" alt=\"No.2\" width=\"56\">\n <p style=\"font-size:24px; margin:10px; color:#BFC1C8;\"><b>Test<b></b></b></p><b><b>\n </div>\n</div>",
"mode": "html"
},
"pluginVersion": "8.0.6",
"targets": [
{
"queryType": "randomWalk",
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": "mysql",
"description": "1. Total number of bugs created.\n2. The bugs being calculated are filtered by \"bug creation time\" (time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 44
},
"id": 16,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "SELECT\n now() as time,\n count(*) as value\nFROM\n jira_issues ji\n join jira_board_issues jbi on ji.issue_id = jbi.issue_id\nWHERE\n std_type = 'Bug'\n and jbi.board_id = $board_id\n and $__timeFilter(created)\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Number of Bugs found in Testing",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Number of bugs created over time.\n2. The time granularity can be switched to week or month by \"Time Interval\" above. \n3. When Time Interval is set to \"month\", bug_count of \"2021-06-01\" calculates the bugs whose creation time falls under [2020-06-01, 2020-07-01)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Bug Count",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 44
},
"id": 18,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with _bugs as (\n SELECT\n DATE_ADD(date(ji.created), INTERVAL -$interval(date(ji.created))+1 DAY) as time,\n count(distinct ji.issue_id) as bug_count\n FROM\n jira_issues ji\n LEFT JOIN jira_board_issues jbi ON jbi.issue_id = ji.issue_id\n WHERE\n std_type = 'Bug'\n and jbi.board_id = $board_id\n and $__timeFilter(ji.created)\n group by 1\n order by 1\n) \n\nselect \n timestamp(time) as time,\n bug_count\nfrom _bugs",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Number of Bugs found in Testing over Time",
"type": "timeseries"
},
{
"datasource": "mysql",
"description": "1. Total number of bugs found per 1,000 lines of code, including both added and deleted llines of code.\n2. The bugs being calculated are filtered by \"bug creation time\". The lines of code being calculated are filtered by \"commit creation time\" (both are affected by the time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 0.32
},
{
"color": "red",
"value": 2.39
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 50
},
"id": 24,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with bc as (\n\tselect \n\t count(*) as bug_count\n\tfrom \n\t jira_issues ji \n\t left join jira_board_issues jbi on (jbi.issue_id = ji.issue_id)\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.std_type = 'Bug'\n\t and $__timeFilter(ji.created)\n),\n\nloc as (\n\tselect \n\t sum(additions + deletions) as line_count\n\tfrom \n\t gitlab_commits gc \n\t left join jira_board_gitlab_projects jbgp on jbgp.gitlab_project_id = gc.project_id\n\twhere\n\t jbgp.jira_board_id = $board_id\n\t and gc.title not like 'Merge branch %'\n\t and $__timeFilter(authored_date)\n)\n\nselect \n now() as time, \n 1.0 * bc.bug_count / loc.line_count * 1000 as value\nfrom loc,bc\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Bug Count per 1k lines of code (Total)",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Bug Count per 1k lines of code over time.\n2. When Time Interval is set to \"month\", bug_count_per_1k_LOC of \"2021-06-01\" calculates the bugs whose creation time falls under [2020-06-01, 2020-07-01) and lines of code whose commit creation time falls under [2020-06-01, 2020-07-01) ",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Bug Count",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 50
},
"id": 22,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with bc as (\n\tselect\n\t DATE_ADD(date(ji.created), INTERVAL -$interval(date(ji.created))+1 DAY) as time,\n\t count(*) as bug_count\n\tfrom \n\t jira_issues ji \n\t left join jira_board_issues jbi on jbi.issue_id = ji.issue_id\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.type = 'Bug'\n\t and $__timeFilter(ji.created)\n\tgroup by 1\n),\nloc as (\n\tselect \n\t DATE_ADD(date(gc.authored_date), INTERVAL -$interval(date(gc.authored_date))+1 DAY) as time,\n\t sum(additions + deletions) as line_count\n\tfrom \n\t gitlab_commits gc \n\t left join jira_board_gitlab_projects jbgp on jbgp.gitlab_project_id = gc.project_id\n\twhere \n\t jbgp.jira_board_id = $board_id\n\t and gc.title not like 'Merge branch %'\n\t and $__timeFilter(authored_date)\n\tgroup by 1\n),\nbug_count_per_1k_loc as(\n select \n bc.time,\n 1.0 * bc.bug_count / loc.line_count * 1000 as bug_count_per_1k_loc\n from \n loc\n left join bc on bc.time = loc.time\n where\n bc.bug_count is not null \n and loc.line_count is not null\n)\n\nselect \n timestamp(time) as time, \n bug_count_per_1k_loc \nfrom bug_count_per_1k_loc\norder by 1;",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Bug Count per 1k lines of code (Breakdown by Time)",
"type": "timeseries"
},
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 56
},
"id": 52,
"options": {
"content": "<div style=\"display: block;text-align: center;margin-top: 56px;\">\n <div style=\"display: inline-flex;\">\n <img src=\"/public/img/lake/3.png\" alt=\"No.3\" width=\"56\">\n <p style=\"font-size:24px; margin:10px; color:#BFC1C8;\"><b>Operation<b></b></b></p><b><b>\n </div>\n</div>",
"mode": "html"
},
"pluginVersion": "8.0.6",
"targets": [
{
"queryType": "randomWalk",
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": "mysql",
"description": "1. Total number of incidents created.\n2. The incidents being calculated are filtered by \"incident creation time\" (time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 60
},
"id": 38,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "SELECT\n now() as time,\n count(*) as value\nFROM\n jira_issues ji\n join jira_board_issues jbi on ji.issue_id = jbi.issue_id\nWHERE\n std_type = 'Incident'\n and jbi.board_id = $board_id\n and $__timeFilter(created)\n",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Number of Incidents found after shipping",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Number of incidents created over time.\n2. The time granularity can be switched to week or month by \"Time Interval\" above. \n3. When Time Interval is set to \"month\", incident_count of \"2021-06-01\" calculates the incidents whose creation time falls under [2020-06-01, 2020-07-01)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Incident Count",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 60
},
"id": 39,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with _incidents as (\n SELECT\n DATE_ADD(date(ji.created), INTERVAL -$interval(date(ji.created))+1 DAY) as time,\n count(distinct ji.issue_id) as incident_count\n FROM\n jira_issues ji\n LEFT JOIN jira_board_issues jbi ON jbi.issue_id = ji.issue_id\n WHERE\n std_type = 'Incident'\n and jbi.board_id = $board_id\n and $__timeFilter(ji.created)\n group by 1\n order by 1\n) \n\nselect \n timestamp(time) as time,\n incident_count\nfrom _incidents",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Number of Incidents found after shipping over Time",
"type": "timeseries"
},
{
"datasource": "mysql",
"description": "1. Total number of incidents found per 1,000 lines of code, including both added and deleted llines of code.\n2. The incidents being calculated are filtered by \"incident creation time\". The lines of code being calculated are filtered by \"commit creation time\" (both are affected by the time filter at the upper-right corner)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 0.32
},
{
"color": "red",
"value": 2.39
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 66
},
"id": 28,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with ic as (\n\tselect \n\t count(*) as incident_count\n\tfrom \n\t jira_issues ji \n\t left join jira_board_issues jbi on (jbi.issue_id = ji.issue_id)\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.type = 'Incident'\n\t and $__timeFilter(ji.created)\n),\n\nloc as (\n\tselect \n\t sum(additions + deletions) as line_count\n\tfrom \n\t gitlab_commits gc \n\t left join jira_board_gitlab_projects jbgp on jbgp.gitlab_project_id = gc.project_id\n\twhere\n\t jbgp.jira_board_id = $board_id\n\t and gc.title not like 'Merge branch %'\n\t and $__timeFilter(authored_date)\n)\n\nselect \n now() as time, \n 1.0 * ic.incident_count / loc.line_count * 1000 as value\nfrom loc,ic",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Incident Count per 1k lines of code (Total)",
"type": "stat"
},
{
"datasource": "mysql",
"description": "1. Incident Count per 1k lines of code over time.\n2. When Time Interval is set to \"month\", incident_count_per_1k_LOC of \"2021-06-01\" calculates the incidents whose creation time falls under [2020-06-01, 2020-07-01) and lines of code whose commit creation time falls under [2020-06-01, 2020-07-01) ",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Incident Count",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 66
},
"id": 30,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with ic as (\n\tselect \n\t DATE_ADD(date(ji.created), INTERVAL -$interval(date(ji.created))+1 DAY) as time,\n\t count(*) as incident_count\n\tfrom \n\t jira_issues ji \n\t left join jira_board_issues jbi on jbi.issue_id = ji.issue_id\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.type = 'Incident'\n\t and $__timeFilter(ji.created)\n\tgroup by 1\n),\nloc as (\n\tselect \n\t DATE_ADD(date(gc.authored_date), INTERVAL -$interval(date(gc.authored_date))+1 DAY) as time,\n\t sum(additions + deletions) as line_count\n\tfrom \n\t gitlab_commits gc \n\t left join jira_board_gitlab_projects jbgp on jbgp.gitlab_project_id = gc.project_id\n\twhere \n\t jbgp.jira_board_id = $board_id\n\t and gc.title not like 'Merge branch %'\n\t and $__timeFilter(authored_date)\n\tgroup by 1\n),\nincident_count_per_1k_loc as(\n select \n ic.time,\n 1.0 * ic.incident_count / loc.line_count * 1000 as incident_count_per_1k_loc\n from \n loc\n left join ic on ic.time = loc.time\n where\n ic.incident_count is not null \n and loc.line_count is not null\n)\n\nselect \n timestamp(time) as time, \n incident_count_per_1k_loc \nfrom incident_count_per_1k_loc\norder by 1;",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Incident Count per 1k lines of code (Breakdown by Time)",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 30,
"style": "dark",
"tags": [
"quality",
"user_value"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": false,
"text": "Month",
"value": "DAY"
},
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": "Time Interval",
"multi": false,
"name": "interval",
"options": [
{
"selected": false,
"text": "Week",
"value": "DAYOFWEEK"
},
{
"selected": true,
"text": "Month",
"value": "DAY"
}
],
"query": "Week : DAYOFWEEK, Month : DAY",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"allValue": null,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": "mysql",
"definition": "select distinct concat(name, ': ', board_id) from jira_boards",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Choose Board",
"multi": false,
"name": "board_id",
"options": [],
"query": "select distinct concat(name, ': ', board_id) from jira_boards",
"refresh": 1,
"regex": "/^(?<text>[^:]+): (?<value>\\d+)$/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6M",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Delivery Quality (require Jira and Gitlab data)",
"uid": "nUC-7tGnk",
"version": 14
}