diff --git a/grafana-dashbords/Build analytics.json b/grafana-dashbords/Build analytics.json index 7de3172..ff04e6a 100644 --- a/grafana-dashbords/Build analytics.json +++ b/grafana-dashbords/Build analytics.json @@ -70,7 +70,7 @@ } ] }, - "editable": true, + "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, @@ -859,6 +859,7 @@ "type": "postgres", "uid": "${DS_POSTGRESQL}" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -880,7 +881,7 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 0, "y": 8 @@ -1005,9 +1006,44 @@ ], "limit": 50 } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT PERCENTILE_CONT(0.95) WITHIN GROUP(ORDER BY durations.duration) as \"95th percentile\" \nFROM \n (SELECT (finished_at - created_at) AS duration \n FROM builds\n WHERE $__unixEpochFilter(created_at) AND finished_at IS NOT NULL) as durations\n", + "refId": "95th", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } } ], "title": "Build duration", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], "type": "stat" }, { @@ -1037,7 +1073,7 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 12, "y": 8 @@ -1171,6 +1207,35 @@ "limit": 50 }, "urlPath": "" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT PERCENTILE_CONT(0.95) WITHIN GROUP(ORDER BY durations.duration) as \"95th percentile\" FROM \n(SELECT (finished_at - started_at) AS duration\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND finished_at IS NOT NULL AND status_id <> 4) as durations", + "refId": "95th percentile", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } } ], "title": "Build task duration", @@ -1206,7 +1271,7 @@ "h": 8, "w": 24, "x": 0, - "y": 15 + "y": 13 }, "id": 20, "options": { @@ -1567,7 +1632,7 @@ "h": 15, "w": 24, "x": 0, - "y": 23 + "y": 21 }, "id": 2, "options": { @@ -1664,6 +1729,6 @@ "timezone": "", "title": "Build analytics", "uid": "02mg4oxVk", - "version": 21, + "version": 24, "weekStart": "" } \ No newline at end of file