| { |
| "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": 13, |
| "iteration": 1682062957718, |
| "links": [], |
| "panels": [ |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 3, |
| "w": 24, |
| "x": 0, |
| "y": 0 |
| }, |
| "id": 111, |
| "options": { |
| "content": "- Use Cases: This dashboard shows the engineering throughput and and cycle time, which helps to identify productivity and bottlenecks of the development process.\n- Data Source Required: GitHub and Jira([transformation](https://devlake.apache.org/docs/UserManuals/ConfigUI/Jira#step-3---adding-transformation-rules-optional) required to tell DevLake what the story_points field is)", |
| "mode": "markdown" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "queryType": "randomWalk", |
| "refId": "A" |
| } |
| ], |
| "title": "Dashboard Introduction", |
| "type": "text" |
| }, |
| { |
| "collapsed": false, |
| "datasource": null, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 3 |
| }, |
| "id": 89, |
| "panels": [], |
| "title": "1. Throughput/Quality", |
| "type": "row" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "blue", |
| "mode": "fixed" |
| }, |
| "custom": { |
| "axisLabel": "Pull Request Count", |
| "axisPlacement": "auto", |
| "barAlignment": 1, |
| "drawStyle": "line", |
| "fillOpacity": 0, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineInterpolation": "linear", |
| "lineStyle": { |
| "fill": "solid" |
| }, |
| "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": "green", |
| "mode": "fixed" |
| } |
| } |
| ] |
| } |
| ] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 0, |
| "y": 4 |
| }, |
| "id": 79, |
| "options": { |
| "legend": { |
| "calcs": [ |
| "sum" |
| ], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "tooltip": { |
| "mode": "multi" |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "time_series", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "SELECT\n DATE_ADD(date(pr.created_date), INTERVAL -$interval(date(pr.created_date))+1 DAY) as time,\n count(distinct pr.id) as \"PR: Opened\",\n count(distinct case when pr.merged_date is not null then id else null end) as \"PR: Merged\"\nFROM pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id\nWHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in ($project)\ngroup by 1\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PRs Opened/Merged", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "Issue Count", |
| "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 |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [ |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "Issues Opened" |
| }, |
| "properties": [ |
| { |
| "id": "color", |
| "value": { |
| "fixedColor": "red", |
| "mode": "fixed" |
| } |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "Issues Completed" |
| }, |
| "properties": [ |
| { |
| "id": "color", |
| "value": { |
| "fixedColor": "green", |
| "mode": "fixed" |
| } |
| } |
| ] |
| } |
| ] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 8, |
| "y": 4 |
| }, |
| "id": 74, |
| "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": "SELECT\n DATE_ADD(date(i.created_date), INTERVAL -$interval(date(i.created_date))+1 DAY) as time,\n count(distinct i.id) as 'Issues Opened',\n count(distinct case when i.status = 'DONE' then i.id else null end) as 'Issues Completed'\nFROM issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nWHERE\n $__timeFilter(i.created_date)\n and pm.project_name in ($project)\ngroup by 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Issue Opened/Completed", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "Story Points", |
| "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 |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 16, |
| "y": 4 |
| }, |
| "id": 98, |
| "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": "SELECT\n DATE_ADD(date(i.created_date), INTERVAL -$interval(date(i.created_date))+1 DAY) as time,\n sum(case when i.status = 'DONE' then i.story_point else 0 end) as 'Story Points Completed'\nFROM issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nWHERE\n $__timeFilter(i.created_date)\n and pm.project_name in ($project)\ngroup by 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Issue Story Points Completed", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "blue", |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "PR Review Depth", |
| "axisPlacement": "auto", |
| "barAlignment": 1, |
| "drawStyle": "line", |
| "fillOpacity": 0, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineInterpolation": "linear", |
| "lineStyle": { |
| "fill": "solid" |
| }, |
| "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": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 0, |
| "y": 11 |
| }, |
| "id": 99, |
| "options": { |
| "legend": { |
| "calcs": [ |
| "mean" |
| ], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "tooltip": { |
| "mode": "multi" |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "time_series", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "SELECT\n DATE_ADD(date(pr.created_date), INTERVAL -$interval(date(pr.created_date))+1 DAY) as time,\n count(distinct prc.id)/count(distinct pr.id) as \"PR Review Depth\"\nFROM \n pull_requests pr\n left join pull_request_comments prc on pr.id = prc.pull_request_id\n join project_mapping pm on pr.base_repo_id = pm.row_id\nWHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n and pr.merged_date is not null\ngroup by 1\n", |
| "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 Depth", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "blue", |
| "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": 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 |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 8, |
| "y": 11 |
| }, |
| "id": 100, |
| "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": "SELECT\n DATE_ADD(date(i.created_date), INTERVAL -$interval(date(i.created_date))+1 DAY) as time,\n count(distinct i.id) as 'P0/P1 Bugs'\nFROM issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nWHERE\n $__timeFilter(i.created_date)\n and pm.project_name in ($project)\n and i.type = 'BUG'\n and i.priority in ($priority)\ngroup by 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "P0/P1 Bugs", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "blue", |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "PR Size", |
| "axisPlacement": "auto", |
| "barAlignment": 1, |
| "drawStyle": "line", |
| "fillOpacity": 0, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineInterpolation": "linear", |
| "lineStyle": { |
| "fill": "solid" |
| }, |
| "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": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 16, |
| "y": 11 |
| }, |
| "id": 101, |
| "options": { |
| "legend": { |
| "calcs": [ |
| "mean" |
| ], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "tooltip": { |
| "mode": "multi" |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "time_series", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "with _pr_commits_data as(\n SELECT\n DATE_ADD(date(pr.created_date), INTERVAL -$interval(date(pr.created_date))+1 DAY) as time,\n pr.id as pr_id,\n prc.commit_sha,\n sum(c.additions)+sum(c.deletions) as loc\n FROM \n pull_requests pr\n left join pull_request_commits prc on pr.id = prc.pull_request_id\n left join commits c on prc.commit_sha = c.sha\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 time,\n sum(loc)/count(distinct pr_id) as 'PR Size'\nFROM _pr_commits_data\nGROUP BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PR Size", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "blue", |
| "mode": "palette-classic" |
| }, |
| "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": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 8, |
| "x": 0, |
| "y": 18 |
| }, |
| "id": 108, |
| "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": "SELECT\n DATE_ADD(date(pr.created_date), INTERVAL -$interval(date(pr.created_date))+1 DAY) as time,\n sum(case when pr.id not in (SELECT pull_request_id FROM pull_request_comments) then 1 else 0 end) as \"PRs Merged w/o Review\"\nFROM \n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id\nWHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in ($project)\n and pr.merged_date is not null\nGROUP BY 1\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PRs Merged w/o Review", |
| "type": "timeseries" |
| }, |
| { |
| "collapsed": false, |
| "datasource": null, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 25 |
| }, |
| "id": 103, |
| "panels": [], |
| "title": "2. Cycle Time", |
| "type": "row" |
| }, |
| { |
| "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": 24, |
| "x": 0, |
| "y": 26 |
| }, |
| "id": 109, |
| "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 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(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\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 avg(cycle_time) as 'PR Cycle Time(h)'\nFROM _prs\nGROUP BY 1\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PR Cycle 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": [] |
| }, |
| "gridPos": { |
| "h": 7, |
| "w": 6, |
| "x": 0, |
| "y": 33 |
| }, |
| "id": 120, |
| "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 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(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\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 avg(coding_time) as 'Coding Time(h)'\nFROM _prs\nGROUP BY 1\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PR Coding 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": 6, |
| "y": 33 |
| }, |
| "id": 117, |
| "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 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(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\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 avg(pickup_time) as 'Pickup Time(h)'\nFROM _prs\nGROUP BY 1\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "PR Pickup 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": 12, |
| "y": 33 |
| }, |
| "id": 118, |
| "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 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(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\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 avg(review_time) as 'Review Time(h)'\nFROM _prs\nGROUP BY 1\nORDER BY 1", |
| "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", |
| "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(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\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 avg(deploy_time) as 'PR Deploy Time(h)'\nFROM _prs\nGROUP BY 1\nORDER BY 1", |
| "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" |
| }, |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 2, |
| "w": 24, |
| "x": 0, |
| "y": 40 |
| }, |
| "id": 113, |
| "options": { |
| "content": "<br/>\n\nThis dashboard is created based on this [data schema](https://devlake.apache.org/docs/DataModels/DevLakeDomainLayerSchema). Want to add more metrics? Please follow the [guide](https://devlake.apache.org/docs/Configuration/Dashboards/GrafanaUserGuide).", |
| "mode": "markdown" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "queryType": "randomWalk", |
| "refId": "A" |
| } |
| ], |
| "type": "text" |
| } |
| ], |
| "refresh": "", |
| "schemaVersion": 30, |
| "style": "dark", |
| "tags": [], |
| "templating": { |
| "list": [ |
| { |
| "allValue": null, |
| "current": { |
| "selected": false, |
| "text": "All", |
| "value": "$__all" |
| }, |
| "datasource": "mysql", |
| "definition": "select distinct name from projects", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "Project", |
| "multi": true, |
| "name": "project", |
| "options": [], |
| "query": "select distinct name from projects", |
| "refresh": 1, |
| "regex": "", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| }, |
| { |
| "allValue": "", |
| "current": { |
| "selected": true, |
| "text": [ |
| "All" |
| ], |
| "value": [ |
| "$__all" |
| ] |
| }, |
| "datasource": "mysql", |
| "definition": "select distinct priority from issues where priority != ''", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "P0+P1 Priority", |
| "multi": true, |
| "name": "priority", |
| "options": [], |
| "query": "select distinct priority from issues where priority != ''", |
| "refresh": 1, |
| "regex": "", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| }, |
| { |
| "allValue": null, |
| "current": { |
| "selected": false, |
| "text": "Month", |
| "value": "DAYOFMONTH" |
| }, |
| "description": "", |
| "error": null, |
| "hide": 0, |
| "includeAll": false, |
| "label": "Time Interval", |
| "multi": false, |
| "name": "interval", |
| "options": [ |
| { |
| "selected": true, |
| "text": "Month", |
| "value": "DAYOFMONTH" |
| }, |
| { |
| "selected": false, |
| "text": "Week", |
| "value": "WEEKDAY" |
| } |
| ], |
| "query": "Month : DAYOFMONTH, Week : WEEKDAY", |
| "queryValue": "", |
| "skipUrlSync": false, |
| "type": "custom" |
| } |
| ] |
| }, |
| "time": { |
| "from": "now-6M", |
| "to": "now" |
| }, |
| "timepicker": {}, |
| "timezone": "", |
| "title": "Engineering Throughput and Cycle Time", |
| "uid": "Jaaimc67k", |
| "version": 3 |
| } |