| { |
| "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": 5, |
| "iteration": 1629095965842, |
| "links": [ |
| { |
| "asDropdown": false, |
| "icon": "bolt", |
| "includeVars": false, |
| "keepTime": false, |
| "tags": [], |
| "targetBlank": false, |
| "title": "Homepage", |
| "tooltip": "", |
| "type": "link", |
| "url": "/d/RXJZNpMnz/homepage?orgId=1" |
| }, |
| { |
| "asDropdown": false, |
| "icon": "external link", |
| "includeVars": false, |
| "keepTime": true, |
| "tags": [ |
| "metrics" |
| ], |
| "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=\"/public/img/lake/practice_process_delivery_quality.png\" alt=\"R&D Process\" width=\"60%\">\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": "Postgres", |
| "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.project_id = gmr.project_id\nWHERE\n jbgp.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": "Postgres", |
| "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(merged_by_username) as value\nFROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.project_id = gmr.project_id\nWHERE\n jbgp.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 Count", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "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 count(merged_by_username)::decimal / count(*)::decimal as value\nFROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.project_id = gmr.project_id\nWHERE\n jbgp.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": "Postgres", |
| "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": "MR 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": [], |
| "max": 100, |
| "min": 0, |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| }, |
| "unit": "percent" |
| }, |
| "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 to_char(gitlab_created_at, '$interval') as time,\n count(merged_by_username)::decimal / count(*)::decimal * 100 as mr_pass_rate\n FROM\n gitlab_merge_requests gmr\n LEFT JOIN jira_board_gitlab_projects jbgp ON jbgp.project_id = gmr.project_id\n WHERE\n jbgp.board_id = $board_id\n and $__timeFilter(gitlab_created_at)\n group by to_char(gitlab_created_at, '$interval')\n order by 1\n)\n\nSELECT \n to_timestamp(time,'$interval') as time,\n mr_pass_rate\nFROM _mr_request_rate\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 (Breakdown by Time)", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 4, |
| "w": 24, |
| "x": 0, |
| "y": 22 |
| }, |
| "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": "Postgres", |
| "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": 26 |
| }, |
| "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.id = jbi.issue_id\nWHERE\n issue_type in ('Bug')\n and jbi.board_id = $board_id\n and $__timeFilter(issue_created_at)\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Number of Bugs found in Testing (Total )", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "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": 26 |
| }, |
| "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 to_char(issue_created_at, '$interval') as time,\n count(*)::decimal as bug_count\n FROM\n jira_issues ji\n LEFT JOIN jira_board_issues jbi ON jbi.issue_id = ji.id\n WHERE\n issue_type = 'Bug'\n and jbi.board_id = $board_id\n and $__timeFilter(issue_created_at)\n group by to_char(issue_created_at, '$interval')\n order by 1\n) \n\nselect \n to_timestamp(time,'$interval') 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 (Breakdown by Time)", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "Postgres", |
| "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": 32 |
| }, |
| "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.id)\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.issue_type = 'Bug'\n\t and $__timeFilter(ji.issue_created_at)\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.project_id = gc.project_id\n\twhere\n\t jbgp.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 bc.bug_count::decimal / loc.line_count::decimal * 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": "Postgres", |
| "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": 32 |
| }, |
| "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 to_char(issue_created_at, '$interval') 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.id\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.issue_type = 'Bug'\n\t and $__timeFilter(ji.issue_created_at)\n\tgroup by 1\n),\nloc as (\n\tselect \n\t to_char(authored_date,'$interval') 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.project_id = gc.project_id\n\twhere \n\t jbgp.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 as time,\n bc.bug_count::decimal / loc.line_count::decimal * 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 order by time\n)\n\nselect \n to_timestamp(time,'$interval') as time, \n bug_count_per_1k_loc \nfrom bug_count_per_1k_loc;\n", |
| "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": 38 |
| }, |
| "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": "Postgres", |
| "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": 42 |
| }, |
| "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.id = jbi.issue_id\nWHERE\n issue_type in ('Incident')\n and jbi.board_id = $board_id\n and $__timeFilter(issue_created_at)\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Number of Incidents found after shipping ( Total)", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "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": 42 |
| }, |
| "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 to_char(issue_created_at, '$interval') as time,\n count(*)::decimal as incident_count\n FROM\n jira_issues ji\n LEFT JOIN jira_board_issues jbi ON jbi.issue_id = ji.id\n WHERE\n issue_type = 'Incident'\n and jbi.board_id = $board_id\n and $__timeFilter(issue_created_at)\n group by to_char(issue_created_at, '$interval')\n order by 1\n) \nselect \n to_timestamp(time,'$interval') 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 (Breakdown by Time)", |
| "type": "timeseries" |
| }, |
| { |
| "datasource": "Postgres", |
| "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": 48 |
| }, |
| "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.id)\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.issue_type = 'Incident'\n\t and $__timeFilter(ji.issue_created_at)\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.project_id = gc.project_id\n\twhere\n\t jbgp.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 ic.incident_count::decimal / loc.line_count::decimal * 1000 as value\nfrom loc,ic", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "value" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "timeColumn": "time", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Incidents Count per 1k lines of code (Total)", |
| "type": "stat" |
| }, |
| { |
| "datasource": "Postgres", |
| "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": 48 |
| }, |
| "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 to_char(issue_created_at, '$interval') 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.id\n\twhere \n\t jbi.board_id = $board_id\n\t and ji.issue_type = 'Incident'\n\t and $__timeFilter(ji.issue_created_at)\n\tgroup by 1\n),\nloc as (\n\tselect \n\t to_char(authored_date,'$interval') 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.project_id = gc.project_id\n\twhere \n\t jbgp.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 as time,\n ic.incident_count::decimal / loc.line_count::decimal * 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 order by time\n)\n\nselect \n to_timestamp(time,'$interval') as time, \n incident_count_per_1k_loc \nfrom incident_count_per_1k_loc;", |
| "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": [ |
| "metrics", |
| "quality" |
| ], |
| "templating": { |
| "list": [ |
| { |
| "allValue": null, |
| "current": { |
| "selected": false, |
| "text": "Month", |
| "value": "YYYY-MM" |
| }, |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": false, |
| "label": "Time Interval", |
| "multi": false, |
| "name": "interval", |
| "options": [ |
| { |
| "selected": false, |
| "text": "Week", |
| "value": "YYYY-WW" |
| }, |
| { |
| "selected": true, |
| "text": "Month", |
| "value": "YYYY-MM" |
| } |
| ], |
| "query": "Week : YYYY-WW, Month : YYYY-MM", |
| "queryValue": "", |
| "skipUrlSync": false, |
| "type": "custom" |
| }, |
| { |
| "allValue": null, |
| "current": { |
| "selected": false, |
| "text": "All", |
| "value": "$__all" |
| }, |
| "datasource": "Postgres", |
| "definition": "select distinct format('%s: %s', name, id) from jira_boards", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "Choose Board", |
| "multi": false, |
| "name": "board_id", |
| "options": [], |
| "query": "select distinct format('%s: %s', name, 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", |
| "uid": "nUC-7tGnk", |
| "version": 137 |
| } |