| { |
| "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": 1, |
| "iteration": 1628008959930, |
| "links": [], |
| "panels": [ |
| { |
| "datasource": "Postgres", |
| "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": 8, |
| "w": 12, |
| "x": 0, |
| "y": 0 |
| }, |
| "id": 22, |
| "options": { |
| "barWidth": 0.97, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "text": {}, |
| "tooltip": { |
| "mode": "single" |
| } |
| }, |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT\n merged_at::varchar as \"Merged At Time\",\n (merged_at::date - first_comment_time::date) as \"Review Time in Days\"\nFROM\n gitlab_merge_requests\nWHERE\n $__timeFilter(merged_at) AND project_id = $ProjectId \n\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Merge Review Time (Days)", |
| "type": "barchart" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 0 |
| }, |
| "id": 14, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT count(email) from (\n\n SELECT\n committer_email\n FROM gitlab_commits\n WHERE\n $__timeFilter(gitlab_commits.committed_date) AND gitlab_commits.project_id = $ProjectId\n Group By committer_email\n) as email\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Contributors", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 8 |
| }, |
| "id": 18, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT count(id) from (\n SELECT\n unnest(reviewers) as reviewer\n FROM\n gitlab_merge_requests\n WHERE\n $__timeFilter(gitlab_created_at) AND project_id = $ProjectId\n group by \n reviewer\n) as id\n\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Reviewers", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "noValue": "0", |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 16, |
| "w": 12, |
| "x": 12, |
| "y": 8 |
| }, |
| "id": 12, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "center", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT\n count(id) as \"Commits\",\n sum(additions) as \"Additions\",\n sum(deletions) as \"Deletions\",\n sum(additions - deletions) as \"LOC\"\nFROM gitlab_commits\nWHERE\n $__timeFilter(gitlab_commits.committed_date) AND gitlab_commits.project_id = $ProjectId\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Lines Of Code", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 16 |
| }, |
| "id": 20, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "\nWITH merged as (\nSELECT\n count(id)\nFROM\n gitlab_merge_requests\nWHERE\n merged_at IS NOT NULL AND\n $__timeFilter(gitlab_created_at) AND \n project_id = $ProjectId\n), notMerged as (SELECT\n count(id)\nFROM\n gitlab_merge_requests\nWHERE\n merged_at IS NULL AND\n $__timeFilter(gitlab_created_at) AND \n project_id = $ProjectId)\n\nSELECT (SELECT * FROM notMerged) as \"Not Merged\",\n (SELECT * FROM merged) as \"Merged\",\n \n(((SELECT * FROM merged)::float/((SELECT * FROM notMerged) + (SELECT * FROM merged)))::float) as \"Ratio\"\n \n \n\n\n\n\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Merge Request Ratio", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 24 |
| }, |
| "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": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT\n count(id) as \"Merge Requests\"\nFROM gitlab_merge_requests\nWHERE\n $__timeFilter(gitlab_created_at) AND project_id = $ProjectId\nORDER BY 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Merge Requests", |
| "type": "stat" |
| }, |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 32 |
| }, |
| "id": 10, |
| "title": "Row title", |
| "type": "row" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "fixedColor": "yellow", |
| "mode": "fixed" |
| }, |
| "custom": { |
| "axisLabel": "Lead Time", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 83, |
| "gradientMode": "hue", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 0 |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 16, |
| "w": 24, |
| "x": 0, |
| "y": 33 |
| }, |
| "id": 2, |
| "options": { |
| "barWidth": 0.8, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "hidden", |
| "placement": "bottom" |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "text": { |
| "valueSize": 10 |
| }, |
| "tooltip": { |
| "mode": "single" |
| } |
| }, |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select \r\n now() as time,\r\n title as title,\r\n lead_time\r\nfrom jira_issues\r\nwhere \r\n lead_time > 0\r\n and $__timeFilter(issue_created_at)\r\norder by created_at;\r\n\r\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Issues Lead Time", |
| "type": "barchart" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| } |
| }, |
| "mappings": [], |
| "unit": "short" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 10, |
| "w": 12, |
| "x": 0, |
| "y": 49 |
| }, |
| "id": 4, |
| "options": { |
| "displayLabels": [ |
| "name" |
| ], |
| "legend": { |
| "displayMode": "list", |
| "placement": "bottom", |
| "values": [ |
| "percent" |
| ] |
| }, |
| "pieType": "pie", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "/^value$/", |
| "values": true |
| }, |
| "tooltip": { |
| "mode": "single" |
| } |
| }, |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select now() as time, count(*) as value, format('>%s', bucket*5) as metric\nfrom (\n select lead_time, width_bucket(lead_time, ARRAY[5, 10, 15, 20]) as bucket\n from jira_issues\n where lead_time > 0\n and $__timeFilter(issue_created_at)\n) as t\ngroup by bucket\norder by bucket", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Lead Time Distribution", |
| "type": "piechart" |
| }, |
| { |
| "datasource": "Postgres", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "barAlignment": 0, |
| "drawStyle": "line", |
| "fillOpacity": 10, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineInterpolation": "linear", |
| "lineWidth": 1, |
| "pointSize": 5, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "showPoints": "never", |
| "spanNulls": true, |
| "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": 10, |
| "w": 12, |
| "x": 12, |
| "y": 49 |
| }, |
| "id": 6, |
| "options": { |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "tooltip": { |
| "mode": "single" |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select \n to_date(to_char(issue_created_at, 'YYYY-MM'), 'YYYY-MM') as time_month,\n percentile_cont(0.5) within group (order by lead_time) as value\nfrom jira_issues\nwhere lead_time > 0\n and $__timeFilter(issue_created_at)\ngroup by to_char(issue_created_at, 'YYYY-MM')\norder by 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value_double" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "test_data", |
| "timeColumn": "time_date_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "timeFrom": null, |
| "timeShift": null, |
| "title": "Lead Time Median Trend", |
| "type": "timeseries" |
| } |
| ], |
| "refresh": "", |
| "schemaVersion": 30, |
| "style": "dark", |
| "tags": [], |
| "templating": { |
| "list": [ |
| { |
| "allValue": null, |
| "current": { |
| "selected": true, |
| "text": "20103385", |
| "value": "20103385" |
| }, |
| "datasource": "Postgres", |
| "definition": "Select id from gitlab_projects", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": false, |
| "label": "ProjectId", |
| "multi": false, |
| "name": "ProjectId", |
| "options": [], |
| "query": "Select id from gitlab_projects", |
| "refresh": 2, |
| "regex": "", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| } |
| ] |
| }, |
| "time": { |
| "from": "now-1y", |
| "to": "now" |
| }, |
| "timepicker": {}, |
| "timezone": "", |
| "title": "Jira lead times & Gitlab basics", |
| "uid": "0BwAzlZ7k", |
| "version": 9 |
| } |