| { |
| "annotations": { |
| "list": [ |
| { |
| "builtIn": 1, |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "enable": true, |
| "hide": true, |
| "iconColor": "rgba(0, 211, 255, 1)", |
| "name": "Annotations & Alerts", |
| "type": "dashboard" |
| } |
| ] |
| }, |
| "description": "This dashboard shows the metrics collected by gitextractor plugin", |
| "editable": true, |
| "fiscalYearStartMonth": 0, |
| "graphTooltip": 0, |
| "id": 18, |
| "links": [], |
| "liveNow": false, |
| "panels": [ |
| { |
| "collapsed": false, |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 0 |
| }, |
| "id": 14, |
| "panels": [], |
| "targets": [ |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "refId": "A" |
| } |
| ], |
| "title": "file dimension", |
| "type": "row" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 1 |
| }, |
| "id": 12, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.78, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "horizontal", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "editorMode": "code", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "SELECT file_path,\n count(distinct author_name) AS cnt\nFROM commits\nJOIN commit_files\nJOIN repo_commits rc\n ON commit_files.commit_sha = rc.commit_sha\n AND commit_files.commit_sha = commits.sha\nWHERE repo_id IN (${repo_id})\n AND $__timeFilter(commits.authored_date)\n AND file_path REGEXP '(${selected_path:regex})'\nGROUP BY file_path\nORDER BY cnt DESC limit 10;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "_raw_data_id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "sql": { |
| "columns": [ |
| { |
| "parameters": [], |
| "type": "function" |
| } |
| ], |
| "groupBy": [ |
| { |
| "property": { |
| "type": "string" |
| }, |
| "type": "groupBy" |
| } |
| ], |
| "limit": 50 |
| }, |
| "table": "issue_commits", |
| "timeColumn": "id", |
| "timeColumnType": "bigint", |
| "where": [] |
| } |
| ], |
| "title": "files with maximum number of authors", |
| "type": "barchart" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "cellOptions": { |
| "type": "auto" |
| }, |
| "inspect": false |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 1 |
| }, |
| "id": 2, |
| "links": [], |
| "options": { |
| "cellHeight": "sm", |
| "footer": { |
| "countRows": false, |
| "fields": "", |
| "reducer": [ |
| "sum" |
| ], |
| "show": false |
| }, |
| "showHeader": true |
| }, |
| "pluginVersion": "9.5.15", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT file_path,\n COUNT(DISTINCT author_name) AS author_count,\n MAX(rst) AS file_total_size,\n MAX(rst) / COUNT(DISTINCT author_name) AS rate\nFROM commits\nJOIN (\n SELECT file_path,\n commit_files.commit_sha,\n SUM(additions - deletions) AS rst\n FROM commit_files\n JOIN repo_commits rc ON commit_files.commit_sha = rc.commit_sha\n WHERE repo_id IN (${repo_id})\n GROUP BY file_path, commit_files.commit_sha\n) a ON a.commit_sha = commits.sha\nGROUP BY file_path\nHAVING author_count > 0\nORDER BY rate DESC\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "largest files with lowest number of authors", |
| "type": "table" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 9 |
| }, |
| "id": 10, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.8, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "horizontal", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "editorMode": "code", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT file_path,\n count(distinct sha) AS modified_num\nFROM commits\nJOIN commit_files\nJOIN repo_commits rc\n ON commit_files.commit_sha = rc.commit_sha\n AND sha=commit_files.commit_sha\n AND $__timeFilter(commits.authored_date)\nWHERE repo_id IN (${repo_id}) and file_path REGEXP '(${selected_path:regex})'\nAND $__timeFilter(commits.authored_date)\nGROUP BY file_path\nORDER BY modified_num desc\nLIMIT 15;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "sql": { |
| "columns": [ |
| { |
| "parameters": [], |
| "type": "function" |
| } |
| ], |
| "groupBy": [ |
| { |
| "property": { |
| "type": "string" |
| }, |
| "type": "groupBy" |
| } |
| ], |
| "limit": 50 |
| }, |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "files with most modifications", |
| "type": "barchart" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 9 |
| }, |
| "id": 8, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.79, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "horizontal", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "editorMode": "code", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT file_path,\n count(distinct sha) AS cnt\nFROM commits\nJOIN commit_files\nJOIN repo_commits rc\n ON commit_files.commit_sha = rc.commit_sha\n AND sha=commit_files.commit_sha\nWHERE repo_id IN (${repo_id})\n AND $__timeFilter(commits.authored_date)\nGROUP BY file_path\nORDER BY cnt desc\nLIMIT 10;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "sql": { |
| "columns": [ |
| { |
| "parameters": [], |
| "type": "function" |
| } |
| ], |
| "groupBy": [ |
| { |
| "property": { |
| "type": "string" |
| }, |
| "type": "groupBy" |
| } |
| ], |
| "limit": 50 |
| }, |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "[total]files with most modifications", |
| "type": "barchart" |
| }, |
| { |
| "collapsed": false, |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 17 |
| }, |
| "id": 6, |
| "panels": [], |
| "targets": [ |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "refId": "A" |
| } |
| ], |
| "title": "author dimension", |
| "type": "row" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 18 |
| }, |
| "id": 16, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.79, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "horizontal", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT author_name,\n count(distinct commit_sha) AS commit_nums\nFROM commits\nJOIN repo_commits\nWHERE commits.sha =repo_commits.commit_sha\n AND repo_commits.repo_id IN (${repo_id})\n AND $__timeFilter(commits.authored_date)\nGROUP BY author_name,author_id\nORDER BY commit_nums desc\nLIMIT 10; ", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "commits distribution by author", |
| "type": "barchart" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 79, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 18 |
| }, |
| "id": 4, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.55, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "horizontal", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT author_name,\n sum(additions-deletions) AS cnt\nFROM commits\nJOIN repo_commits\nWHERE commits.sha =repo_commits.commit_sha\n AND repo_commits.repo_id IN (${repo_id})\n AND $__timeFilter(commits.authored_date)\nGROUP BY author_name,author_id\nORDER BY cnt DESC \nLIMIT 10;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "lines of code distribution by author", |
| "type": "barchart" |
| }, |
| { |
| "collapsed": false, |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 26 |
| }, |
| "id": 20, |
| "panels": [], |
| "targets": [ |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "refId": "A" |
| } |
| ], |
| "title": "time perspective", |
| "type": "row" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green" |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 27 |
| }, |
| "id": 22, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.97, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT\n CASE cast(dayofweek(authored_date) AS char) \n WHEN '1' THEN\n '1.Monday'\n WHEN '2' THEN\n '2.Tuesday'\n WHEN '3' THEN\n '3.Wednesday'\n WHEN '4' THEN\n '4.Thursday'\n WHEN '5' THEN\n '5.Friday'\n WHEN '6' THEN\n '6.Saturday'\n WHEN '7' THEN\n '7.Sunday'\n END AS weekday , count(distinct commit_sha) AS commit_nums\nFROM commits\nJOIN repo_commits\nWHERE $__timeFilter(commits.authored_date)\n AND commits.sha =repo_commits.commit_sha\n AND repo_commits.repo_id IN (${repo_id})\nGROUP BY weekday\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "commits distribution", |
| "type": "barchart" |
| }, |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "-- Mixed --" |
| }, |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green" |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 27 |
| }, |
| "id": 24, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.97, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT\n CASE cast(dayofweek(authored_date) AS char)\n WHEN '1' THEN\n '1.Monday'\n WHEN '2' THEN\n '2.Tuesday'\n WHEN '3' THEN\n '3.Wednesday'\n WHEN '4' THEN\n '4.Thursday'\n WHEN '5' THEN\n '5.Friday'\n WHEN '6' THEN\n '6.Saturday'\n WHEN '7' THEN\n '7.Sunday'\n END AS weekday , sum(additions-deletions) AS changed_nums, sum(additions) AS total_additions, sum(deletions) AS total_deletions\nFROM commits\nJOIN repo_commits\nWHERE commits.sha =repo_commits.commit_sha\n AND repo_commits.repo_id IN (${repo_id})\n AND $__timeFilter(commits.authored_date)\nGROUP BY weekday\nORDER BY weekday", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "lines of code distribution", |
| "type": "barchart" |
| }, |
| { |
| "collapsed": false, |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 35 |
| }, |
| "id": 26, |
| "panels": [], |
| "targets": [ |
| { |
| "datasource": { |
| "type": "datasource", |
| "uid": "grafana" |
| }, |
| "refId": "A" |
| } |
| ], |
| "title": "lineage dimension", |
| "type": "row" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisCenteredZero": false, |
| "axisColorMode": "text", |
| "axisLabel": "", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 80, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1, |
| "scaleDistribution": { |
| "type": "linear" |
| }, |
| "thresholdsStyle": { |
| "mode": "off" |
| } |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green" |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 0, |
| "y": 36 |
| }, |
| "id": 28, |
| "links": [], |
| "options": { |
| "barRadius": 0, |
| "barWidth": 0.97, |
| "fullHighlight": false, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom", |
| "showLegend": true |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "stacking": "none", |
| "text": {}, |
| "tooltip": { |
| "mode": "single", |
| "sort": "none" |
| }, |
| "xTickLabelRotation": 0, |
| "xTickLabelSpacing": 0 |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT CASE cast(dayofweek(commits.committed_date) AS char)\n WHEN '1' THEN\n '1.Monday'\n WHEN '2' THEN\n '2.Tuesday'\n WHEN '3' THEN\n '3.Wednesday'\n WHEN '4' THEN\n '4.Thursday'\n WHEN '5' THEN\n '5.Friday'\n WHEN '6' THEN\n '6.Saturday'\n WHEN '7' THEN\n '7.Sunday'\n END AS wd,\n count(*) as lived_lines\nFROM repo_snapshot\n JOIN commits\n ON commits.sha=repo_snapshot.commit_sha\nWHERE repo_snapshot.repo_id IN (${repo_id})\n AND $__timeFilter(commits.committed_date)\nGROUP BY wd\nORDER BY wd ;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "In which day the code has highest chance to stay in repository.", |
| "type": "barchart" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "cellOptions": { |
| "type": "auto" |
| }, |
| "inspect": false |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green" |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 12, |
| "x": 12, |
| "y": 36 |
| }, |
| "id": 30, |
| "links": [], |
| "options": { |
| "cellHeight": "sm", |
| "footer": { |
| "countRows": false, |
| "fields": "", |
| "reducer": [ |
| "sum" |
| ], |
| "show": false |
| }, |
| "showHeader": true |
| }, |
| "pluginVersion": "9.5.15", |
| "targets": [ |
| { |
| "datasource": "mysql", |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "SELECT file_path,\n avg(timestampdiff(day,\n commits.committed_date,\n now())) AS line_age\nFROM repo_snapshot\nJOIN commits\n ON repo_snapshot.commit_sha = commits.sha\nWHERE repo_snapshot.repo_id IN (${repo_id})\n AND $__timeFilter(commits.committed_date)\nGROUP BY file_path\nORDER BY line_age desc \nLIMIT 20;", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_blueprints", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Which file has the longest average line age?", |
| "type": "table" |
| } |
| ], |
| "refresh": "", |
| "schemaVersion": 38, |
| "style": "dark", |
| "tags": [ |
| "Engineering Leads Dashboard" |
| ], |
| "templating": { |
| "list": [ |
| { |
| "current": { |
| "selected": true, |
| "text": [ |
| "All" |
| ], |
| "value": [ |
| "$__all" |
| ] |
| }, |
| "datasource": "mysql", |
| "definition": "select concat(name, '--', id) as text from repos", |
| "hide": 0, |
| "includeAll": true, |
| "label": "Repo", |
| "multi": true, |
| "name": "repo_id", |
| "options": [], |
| "query": "select concat(name, '--', id) as text from repos", |
| "refresh": 1, |
| "regex": "/^(?<text>.*)--(?<value>.*)$/", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| }, |
| { |
| "current": { |
| "selected": false, |
| "text": "", |
| "value": "" |
| }, |
| "description": "input file path", |
| "hide": 0, |
| "label": "", |
| "name": "selected_path", |
| "options": [ |
| { |
| "selected": true, |
| "text": "", |
| "value": "" |
| } |
| ], |
| "query": "", |
| "skipUrlSync": false, |
| "type": "textbox" |
| } |
| ] |
| }, |
| "time": { |
| "from": "now-6M", |
| "to": "now" |
| }, |
| "timepicker": { |
| "refresh_intervals": [ |
| "5s", |
| "10s", |
| "30s", |
| "1m", |
| "5m", |
| "15m", |
| "30m", |
| "1h", |
| "2h", |
| "1d" |
| ] |
| }, |
| "timezone": "", |
| "title": "Component and File-level Metrics", |
| "uid": "KxUh7IG4z", |
| "version": 2, |
| "weekStart": "" |
| } |