From 22fb4a6423a34d3970dd325fafd36c49bbfd9881 Mon Sep 17 00:00:00 2001 From: Kirill Zhukov Date: Fri, 10 Mar 2023 11:24:17 +0100 Subject: [PATCH] ALBS-1026 grafana: added dashboards for Build details, small fixes on other ones --- grafana-dashbords/Build analytics.json | 2954 +++++++++++++++++++-- grafana-dashbords/Build details.json | 2223 +++++++++++++++- grafana-dashbords/Build task details.json | 621 ++--- 3 files changed, 5210 insertions(+), 588 deletions(-) diff --git a/grafana-dashbords/Build analytics.json b/grafana-dashbords/Build analytics.json index 5a0eb4c..374b650 100644 --- a/grafana-dashbords/Build analytics.json +++ b/grafana-dashbords/Build analytics.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_ALBS_ANALYTICS", - "label": "albs_analytics", + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", "description": "", "type": "datasource", "pluginId": "postgres", @@ -11,11 +11,17 @@ ], "__elements": {}, "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "9.3.6" + "version": "9.3.2" }, { "type": "panel", @@ -87,7 +93,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "fieldConfig": { "defaults": { @@ -171,13 +177,13 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", "hide": false, "rawQuery": true, - "rawSql": "SELECT COUNT(*) AS finished\nFROM builds\nWHERE $__unixEpochFilter(created_at) AND finished_at is NOT NULL;", + "rawSql": "SELECT COUNT(*) AS finished\nFROM builds\nWHERE $__unixEpochFilter(created_at);", "refId": "B", "sql": { "columns": [ @@ -200,7 +206,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -233,7 +239,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "description": "", "fieldConfig": { @@ -363,7 +369,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -392,7 +398,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -421,7 +427,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -450,7 +456,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -479,7 +485,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -512,7 +518,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "description": "", "fieldConfig": { @@ -630,7 +636,7 @@ { "id": "color", "value": { - "fixedColor": "red", + "fixedColor": "dark-orange", "mode": "fixed" } } @@ -702,7 +708,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -731,7 +737,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -760,7 +766,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -789,7 +795,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -818,7 +824,7 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "format": "table", @@ -851,8 +857,9 @@ { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -874,8 +881,8 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, + "h": 5, + "w": 9, "x": 0, "y": 8 }, @@ -894,13 +901,13 @@ }, "textMode": "auto" }, - "pluginVersion": "9.3.6", + "pluginVersion": "9.3.2", "targets": [ { "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -913,7 +920,7 @@ "queryParams": "", "rawQuery": true, "rawSql": "SELECT MAX(finished_at - created_at) AS MAX\nFROM builds\nWHERE $__unixEpochFilter(created_at) AND finished_at IS NOT NULL;", - "refId": "MAX", + "refId": "max", "sql": { "columns": [ { @@ -937,7 +944,7 @@ "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -951,7 +958,7 @@ "queryParams": "", "rawQuery": true, "rawSql": "SELECT MIN(finished_at - created_at) AS MIN\nFROM builds\nWHERE $__unixEpochFilter(created_at) AND finished_at IS NOT NULL;", - "refId": "MIN", + "refId": "min", "sql": { "columns": [ { @@ -972,24 +979,16 @@ "urlPath": "" }, { - "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", - "fields": [ - { - "jsonPath": "" - } - ], "format": "table", "hide": false, - "method": "GET", - "queryParams": "", "rawQuery": true, - "rawSql": "SELECT AVG(finished_at - created_at) AS AVG\nFROM builds\nWHERE $__unixEpochFilter(created_at) AND finished_at IS NOT NULL;", - "refId": "AVG", + "rawSql": "SELECT PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY durations.duration) as median FROM \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": "meidan", "sql": { "columns": [ { @@ -1006,19 +1005,53 @@ } ], "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" }, - "urlPath": "" + "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" }, { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, - "description": "", + "description": "Averages for build tasks with \"completed\"\nstatus", "fieldConfig": { "defaults": { "color": { @@ -1040,9 +1073,9 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, - "x": 12, + "h": 5, + "w": 9, + "x": 9, "y": 8 }, "id": 18, @@ -1060,13 +1093,13 @@ }, "textMode": "auto" }, - "pluginVersion": "9.3.6", + "pluginVersion": "9.3.2", "targets": [ { "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -1078,8 +1111,8 @@ "method": "GET", "queryParams": "", "rawQuery": true, - "rawSql": "SELECT MAX(finished_at - started_at) AS MAX\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id=2;", - "refId": "MAX", + "rawSql": "SELECT MAX(finished_at - started_at) AS MAX\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id = 2", + "refId": "max", "sql": { "columns": [ { @@ -1103,7 +1136,7 @@ "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -1116,8 +1149,8 @@ "method": "GET", "queryParams": "", "rawQuery": true, - "rawSql": "SELECT MIN(finished_at - started_at) AS MIN\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id = 2;", - "refId": "MIN", + "rawSql": "SELECT MIN(finished_at - started_at) AS MIN\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id = 2", + "refId": "min", "sql": { "columns": [ { @@ -1141,7 +1174,7 @@ "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -1154,8 +1187,8 @@ "method": "GET", "queryParams": "", "rawQuery": true, - "rawSql": "SELECT AVG(finished_at - started_at) AS AVG\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id <> 2", - "refId": "AVG", + "rawSql": "SELECT PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY durations.duration) as median FROM \n(SELECT (finished_at - started_at) AS duration\nFROM build_tasks\nWHERE $__unixEpochFilter(started_at) AND status_id = 2) as durations\n\n\n", + "refId": "median", "sql": { "columns": [ { @@ -1174,80 +1207,64 @@ "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 status_id = 2) as durations", + "refId": "95th percentile", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } } ], - "title": "Build task duration", + "title": "Build tasks duration (completed)", "type": "stat" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 5, - "panels": [], - "title": "Build details", - "type": "row" - }, { "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, - "description": "", + "description": "How much time were spent in queue. \n\nStats for \"completed\" build tasks only", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": true, - "inspect": false - }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ - { - "color": "green" - }, { "color": "red", - "value": 80 + "value": null } ] - } + }, + "unit": "s" }, "overrides": [ - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "unit", - "value": "s" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "url" - }, - "properties": [ - { - "id": "custom.width", - "value": 287 - } - ] - }, { "matcher": { "id": "byName", @@ -1255,43 +1272,65 @@ }, "properties": [ { - "id": "custom.width", - "value": 107 + "id": "unit", + "value": "none" + }, + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}\n\n" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "wait-time" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } } ] } ] }, "gridPos": { - "h": 15, - "w": 24, - "x": 0, - "y": 16 + "h": 5, + "w": 6, + "x": 18, + "y": 8 }, - "id": 2, + "id": 41, "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "show": false + "fields": "", + "values": false }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "duration" - } - ] + "textMode": "auto" }, - "pluginVersion": "9.3.6", + "pluginVersion": "9.3.2", "targets": [ { "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, "editorMode": "code", "fields": [ @@ -1300,11 +1339,10 @@ } ], "format": "table", - "hide": false, "method": "GET", "queryParams": "", "rawQuery": true, - "rawSql": "SELECT \n b.id, \n b.url, \n b.created_at * 1000 as created,\n b.finished_at * 1000 as finished,\n (SELECT COUNT(id) FROM build_tasks AS bt WHERE bt.build_id = b.id) AS task_count,\n b.finished_at - b.created_at as duration\nFROM builds as b \nWHERE $__unixEpochFilter(created_at) AND b.finished_at IS NOT NULL", + "rawSql": "SELECT\n bt.id, \n SUM(bt.finished_at - bt.started_at) AS task_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM web_node_stats AS ws \n WHERE ws.build_task_id = bt.id AND stat_name_id=0) AS web_node_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM build_node_stats AS bs \n WHERE bs.build_task_id = bt.id AND stat_name_id=6) AS build_node_duration\nFROM build_tasks AS bt\nWHERE $__unixEpochFilter(started_at) AND status_id = 2\nGROUP BY bt.id;", "refId": "A", "sql": { "columns": [ @@ -1326,168 +1364,2568 @@ "urlPath": "" } ], - "title": "Finished builds", + "title": "Build task wait time (completed)", "transformations": [ { - "id": "convertFieldType", + "id": "calculateField", "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "created" - }, - { - "destinationType": "time", - "targetField": "finished" - } - ], - "fields": {} + "binary": { + "left": "web_node_duration", + "reducer": "sum", + "right": "build_node_duration" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "binary": { + "left": "task_duration", + "operator": "-", + "reducer": "sum", + "right": "web_node_duration build_node_duration" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "build_id": true, + "build_node_duration": true, + "id": true, + "task_duration": true, + "web_node_duration": true, + "web_node_duration build_node_duration": true + }, + "indexByName": {}, + "renameByName": { + "task_duration - web_node_duration build_node_duration": "wait-time" + } + } + }, + { + "id": "reduce", + "options": { + "labelsToFields": false, + "reducers": [ + "max", + "min", + "mean" + ] } } ], - "type": "table" + "type": "stat" }, { - "collapsed": false, + "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 31 + "y": 13 }, - "id": 7, - "panels": [], - "title": "Build tasks details", + "id": 26, + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#61a69d", + "mode": "fixed" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build_binaries" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "upload" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "packages_processing" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build_srpm" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "notarize_artifacts" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "logs_processing" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "source_authenticate" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "git_checkout" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 33, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as upload\nFROM build_node_stats \nWHERE stat_name_id = 0 AND $__unixEpochFilter(start_ts);", + "refId": "upload", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "start_ts", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "build_node_stats", + "urlPath": "" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as build_srpm\nFROM build_node_stats \nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts);", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as git_checkout\nFROM build_node_stats \nWHERE stat_name_id = 3 AND $__unixEpochFilter(start_ts);", + "refId": "git_checkout", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as build_binaries\nFROM build_node_stats \nWHERE stat_name_id = 4 AND $__unixEpochFilter(start_ts);", + "refId": "build_binaries", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as notarize_artifacts\nFROM build_node_stats \nWHERE stat_name_id = 7 AND $__unixEpochFilter(start_ts)", + "refId": "cas_notarize_artifacts", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as source_authenticate\nFROM build_node_stats \nWHERE stat_name_id = 8 AND $__unixEpochFilter(start_ts);", + "refId": "cas_source_authenticate", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as logs_processing\nFROM web_node_stats \nWHERE stat_name_id = 1 AND $__unixEpochFilter(start_ts);", + "refId": "logs_processing", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as packages_processing\nFROM web_node_stats \nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts);", + "refId": "packages_procession", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Duration (%)", + "type": "piechart" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#61a69d", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "wait_time" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 14 + }, + "id": 20, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as git_checkout\nFROM build_node_stats \nWHERE stat_name_id = 3 AND $__unixEpochFilter(start_ts);", + "refId": "git_checkout", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as source_authenticate\nFROM build_node_stats \nWHERE stat_name_id = 8 AND $__unixEpochFilter(start_ts);", + "refId": "cas_source_authenticate", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as build_srpm\nFROM build_node_stats \nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts);", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as build_binaries\nFROM build_node_stats \nWHERE stat_name_id = 4 AND $__unixEpochFilter(start_ts);", + "refId": "build_binaries", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as notarize_artifacts\nFROM build_node_stats \nWHERE stat_name_id = 7 AND $__unixEpochFilter(start_ts)", + "refId": "cas_notarize_artifacts", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as logs_processing\nFROM web_node_stats \nWHERE stat_name_id = 1 AND $__unixEpochFilter(start_ts);", + "refId": "logs_processing", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as packages_processing\nFROM web_node_stats \nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts);", + "refId": "packages_processing", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT SUM(end_ts - start_ts) as upload\nFROM build_node_stats \nWHERE stat_name_id = 0 AND $__unixEpochFilter(start_ts);", + "refId": "upload", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "start_ts", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "build_node_stats", + "urlPath": "" + } + ], + "title": "Duration (absolute)", + "type": "bargauge" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest git_checkout step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build_task" + }, + "properties": [ + { + "id": "custom.width", + "value": 82 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 87 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 0, + "y": 22 + }, + "id": 28, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 3 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "git_checkout", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest source_authenticate step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 78 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 3, + "y": 22 + }, + "id": 31, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 8 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "source_authenticate", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest build_binaries step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 81 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 6, + "y": 22 + }, + "id": 29, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 4 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "build_binaries", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest build_srpm step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 81 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 82 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 9, + "y": 22 + }, + "id": 27, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "build_srpm", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest notarize_artifacts step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 78 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 12, + "y": 22 + }, + "id": 30, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 7 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "notarize_artifacts", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest logs_processing step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 78 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 15, + "y": 22 + }, + "id": 32, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM web_node_stats\nWHERE stat_name_id = 1 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "logs_processing", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build tasks with longest packages_processing step", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 78 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 18, + "y": 22 + }, + "id": 34, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\", (end_ts - start_ts) as duration\nFROM web_node_stats\nWHERE stat_name_id = 2 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "packages_processing", + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Top 5 build_tasks with longest upload", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 79 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build task" + }, + "properties": [ + { + "id": "custom.width", + "value": 88 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 21, + "y": 22 + }, + "id": 35, + "options": { + "footer": { + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT build_task_id AS \"build task\" , (end_ts - start_ts) as duration\nFROM build_node_stats\nWHERE stat_name_id = 0 AND $__unixEpochFilter(start_ts)\nORDER BY duration DESC\nLIMIT 5;", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "upload", + "type": "table" + } + ], + "title": "Build Steps", "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": true, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "unit", - "value": "s" - } - ] - } - ] - }, + "collapsed": true, "gridPos": { - "h": 12, + "h": 1, "w": 24, "x": 0, - "y": 32 + "y": 14 }, - "id": 15, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "duration" - } - ] - }, - "pluginVersion": "9.3.6", - "targets": [ + "id": 24, + "panels": [ { - "cacheDurationSeconds": 300, "datasource": { "type": "postgres", - "uid": "${DS_ALBS_ANALYTICS}" + "uid": "${DS_POSTGRESQL}" }, - "editorMode": "code", - "fields": [ - { - "jsonPath": "" - } - ], - "format": "table", - "method": "GET", - "queryParams": "", - "rawQuery": true, - "rawSql": "SELECT\n bt.id,\n bt.name,\n bt.build_id,\n arch_enum.value AS arch,\n status_enum.value AS status,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n bt.finished_at - bt.started_at AS duration \nFROM build_tasks AS bt\nJOIN build_task_status_enum AS status_enum ON bt.status_id = status_enum.id\nJOIN arch_enum on bt.arch_id = arch_enum.id\nWHERE $__unixEpochFilter(started_at) AND status_id >= 2;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ], - "groupBy": [ + }, + "overrides": [ { - "property": { - "type": "string" + "matcher": { + "id": "byName", + "options": "duration" }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "urlPath": "" - } - ], - "title": "Finished buld tasks", - "transformations": [ - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "started" + "properties": [ + { + "id": "unit", + "value": "s" + } + ] }, { - "destinationType": "time", - "targetField": "finished" + "matcher": { + "id": "byName", + "options": "url" + }, + "properties": [ + { + "id": "custom.width", + "value": 287 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 107 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}" + } + ] + } + ] } - ], - "fields": {} - } + ] + }, + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT \n b.id, \n b.url, \n b.created_at * 1000 as created,\n b.finished_at * 1000 as finished,\n (SELECT COUNT(id) FROM build_tasks AS bt WHERE bt.build_id = b.id) AS task_count,\n b.finished_at - b.created_at as duration\nFROM builds as b \nWHERE $__unixEpochFilter(created_at) AND b.finished_at IS NOT NULL", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Finished builds", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "created" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" } ], - "type": "table" + "title": "Builds", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 39, + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.width", + "value": 103 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}\n\n" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 88 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 108 + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": ".*duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build id" + }, + "properties": [ + { + "id": "custom.width", + "value": 89 + }, + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}\n\n" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 37, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "task_duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": " SELECT\n bt.id,\n bt.build_id AS \"build id\",\n bt.name,\n arch_enum.value AS arch,\n status_enum.value AS status,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n bt.finished_at - bt.started_at AS task_duration\n FROM build_tasks AS bt\n JOIN build_task_status_enum AS status_enum ON bt.status_id = status_enum.id\n JOIN arch_enum on bt.arch_id = arch_enum.id \n WHERE $__unixEpochFilter(started_at)", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": true, + "rawQuery": true, + "rawSql": "SELECT\n bt.id, \n bt.build_id,\n SUM(bt.finished_at - bt.started_at) AS task_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM web_node_stats AS ws \n WHERE ws.build_task_id = bt.id AND stat_name_id=0) AS web_node_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM build_node_stats AS bs \n WHERE bs.build_task_id = bt.id AND stat_name_id=6) AS build_node_duration\nFROM build_tasks AS bt\nWHERE $__unixEpochFilter(started_at) \nGROUP BY bt.id;", + "refId": "B", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "All build tasks", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + }, + { + "id": "joinByField", + "options": { + "byField": "id", + "mode": "outer" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "(.*duration)|(wait time)" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 70 + }, + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}\n\n" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "arch" + }, + "properties": [ + { + "id": "custom.width", + "value": 111 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}\n\n\n" + } + ] + }, + { + "id": "custom.width", + "value": 102 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 75 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "task duration" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 43, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "task duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT\n bt.id,\n bt.build_id AS \"build id\",\n bt.name,\n arch_enum.value AS arch,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n task_duration AS \"task duration\",\n web_node_duration AS \"web node duration\",\n build_node_duration AS \"build node duration\",\n task_duration - web_node_duration - build_node_duration as \"wait time\"\n FROM build_tasks AS bt\n JOIN arch_enum on bt.arch_id = arch_enum.id \n LEFT JOIN \n (\n SELECT\n bt.id,\n bt.finished_at - bt.started_at AS task_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM web_node_stats AS ws \n WHERE ws.build_task_id = bt.id AND stat_name_id=0) AS web_node_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM build_node_stats AS bs \n WHERE bs.build_task_id = bt.id AND stat_name_id=6) AS build_node_duration\n FROM build_tasks AS bt\n WHERE $__unixEpochFilter(started_at) AND status_id = 2\n GROUP BY bt.id\n ) as d\n ON bt.id = d.id\n WHERE $__unixEpochFilter(started_at) AND status_id = 2", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Completed build tasks", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" + } + ], + "title": "Build tasks", + "type": "row" } ], - "refresh": "1m", + "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], @@ -1502,6 +3940,6 @@ "timezone": "", "title": "Build analytics", "uid": "02mg4oxVk", - "version": 5, + "version": 63, "weekStart": "" } \ No newline at end of file diff --git a/grafana-dashbords/Build details.json b/grafana-dashbords/Build details.json index c3d860b..24c67db 100644 --- a/grafana-dashbords/Build details.json +++ b/grafana-dashbords/Build details.json @@ -11,18 +11,36 @@ ], "__elements": {}, "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "9.3.2" }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, { "type": "datasource", "id": "postgres", "name": "PostgreSQL", "version": "1.0.0" }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, { "type": "panel", "id": "table", @@ -59,6 +77,19 @@ "links": [], "liveNow": false, "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 16, + "panels": [], + "title": "Summary", + "type": "row" + }, { "datasource": { "type": "postgres", @@ -83,29 +114,15 @@ { "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] } }, "overrides": [ - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "", - "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" - } - ] - } - ] - }, { "matcher": { "id": "byName", @@ -117,16 +134,57 @@ "value": "s" } ] + }, + { + "matcher": { + "id": "byName", + "options": "url" + }, + "properties": [ + { + "id": "custom.width", + "value": 287 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 107 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}" + } + ] + } + ] } ] }, "gridPos": { - "h": 14, + "h": 3, "w": 24, "x": 0, - "y": 0 + "y": 1 }, - "id": 2, + "id": 10, "options": { "footer": { "fields": "", @@ -139,7 +197,7 @@ "sortBy": [ { "desc": true, - "displayName": "build_id" + "displayName": "duration" } ] }, @@ -158,10 +216,11 @@ } ], "format": "table", + "hide": false, "method": "GET", "queryParams": "", "rawQuery": true, - "rawSql": "SELECT\n bt.id,\n bt.name,\n arch_enum.value AS arch,\n status_enum.value AS status,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n bt.finished_at - bt.started_at AS duration \nFROM build_tasks AS bt\nJOIN build_task_status_enum AS status_enum ON bt.status_id = status_enum.id\nJOIN arch_enum on bt.arch_id = arch_enum.id\nWHERE bt.build_id = $build_id;", + "rawSql": "SELECT \n b.id, \n b.url, \n b.created_at * 1000 as created,\n b.finished_at * 1000 as finished,\n (SELECT COUNT(id) FROM build_tasks AS bt WHERE bt.build_id = b.id) AS task_count,\n b.finished_at - b.created_at as duration\nFROM builds as b \nWHERE id = $build_id ", "refId": "A", "sql": { "columns": [ @@ -183,7 +242,7 @@ "urlPath": "" } ], - "title": "Build tasks", + "title": "Build info", "transformations": [ { "id": "convertFieldType", @@ -191,7 +250,7 @@ "conversions": [ { "destinationType": "time", - "targetField": "started" + "targetField": "created" }, { "destinationType": "time", @@ -203,8 +262,2116 @@ } ], "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "completed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "idle" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "excluded" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 4 + }, + "id": 4, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS idle FROM build_tasks \nWHERE build_id = $build_id AND status_id = 0;", + "refId": "idle", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS started FROM build_tasks \nWHERE build_id = $build_id AND status_id = 1;", + "refId": "started", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS completed FROM build_tasks \nWHERE build_id = $build_id AND status_id = 2;", + "refId": "completed", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS failed FROM build_tasks \nWHERE build_id = $build_id AND status_id = 3;", + "refId": "failed", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS excluded FROM build_tasks \nWHERE build_id = $build_id AND status_id = 4;", + "refId": "excluded", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Build tasks by status", + "type": "piechart" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "running" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "completed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "idle" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "excluded" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "x86_64" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "i686" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "aarch64" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ppc64le" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 7, + "y": 4 + }, + "id": 6, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS i686 FROM build_tasks \nWHERE build_id = $build_id AND arch_id = 0;", + "refId": "i686", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS x86_64 FROM build_tasks \nWHERE build_id = $build_id AND arch_id = 1;", + "refId": "x86_64", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS aarch64 FROM build_tasks \nWHERE build_id = $build_id AND arch_id = 2;", + "refId": "aarch64", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS ppc64le FROM build_tasks \nWHERE build_id = $build_id AND arch_id = 3;", + "refId": "ppc64le", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT COUNT(id) AS s390x FROM build_tasks \nWHERE build_id = $build_id AND arch_id = 4;", + "refId": "s390x", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Build tasks by arch", + "type": "piechart" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "Averages for build tasks with \"completed\"\nstatus", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 10, + "x": 14, + "y": 4 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT MAX(finished_at - started_at) AS MAX\nFROM build_tasks\nWHERE build_id = $build_id AND status_id = 2", + "refId": "max", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + }, + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT MIN(finished_at - started_at) AS MIN\nFROM build_tasks\nWHERE build_id = $build_id AND status_id = 2", + "refId": "min", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + }, + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY durations.duration) as median FROM \n(SELECT (finished_at - started_at) AS duration\nFROM build_tasks\nWHERE build_id = $build_id AND status_id = 2) as durations\n\n\n", + "refId": "median", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "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 build_id = $build_id AND status_id = 2) as durations", + "refId": "95th percentile", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Build tasks duration (completed)", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "How much time were spent in queue. \n\nStats for \"completed\" build tasks only", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}\n\n" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "wait-time" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 10, + "x": 14, + "y": 8 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT\n bt.id, \n SUM(bt.finished_at - bt.started_at) AS task_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM web_node_stats AS ws \n WHERE ws.build_task_id = bt.id AND stat_name_id=0) AS web_node_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM build_node_stats AS bs \n WHERE bs.build_task_id = bt.id AND stat_name_id=6) AS build_node_duration\nFROM build_tasks AS bt\nWHERE build_id = $build_id AND status_id = 2\nGROUP BY bt.id;", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Build task wait time (completed)", + "transformations": [ + { + "id": "calculateField", + "options": { + "binary": { + "left": "web_node_duration", + "reducer": "sum", + "right": "build_node_duration" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "binary": { + "left": "task_duration", + "operator": "-", + "reducer": "sum", + "right": "web_node_duration build_node_duration" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "build_id": true, + "build_node_duration": true, + "id": true, + "task_duration": true, + "web_node_duration": true, + "web_node_duration build_node_duration": true + }, + "indexByName": {}, + "renameByName": { + "task_duration - web_node_duration build_node_duration": "wait-time" + } + } + }, + { + "id": "reduce", + "options": { + "labelsToFields": false, + "reducers": [ + "max", + "min", + "mean" + ] + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 23, + "panels": [], + "title": "Build steps", + "type": "row" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#61a69d", + "mode": "fixed" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "build_binaries" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "upload" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "packages_processing" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build_srpm" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "notarize_artifacts" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "logs_processing" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "source_authenticate" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "git_checkout" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 13 + }, + "id": 20, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as upload\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 0 AND build_tasks.build_id = $build_id ", + "refId": "upload", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "start_ts", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "build_node_stats", + "urlPath": "" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as build_srpm\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 2 AND build_tasks.build_id = $build_id ", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as git_checkout\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 3 AND build_tasks.build_id = $build_id ", + "refId": "git_checkout", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as build_binaries\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 4 AND build_tasks.build_id = $build_id ", + "refId": "build_binaries", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as notarize_artifacts\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 7 AND build_tasks.build_id = $build_id ", + "refId": "cas_notarize_artifacts", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as source_authenticate\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 8 AND build_tasks.build_id = $build_id ", + "refId": "cas_source_authenticate", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n SUM(end_ts - start_ts) AS logs_processing\nFROM web_node_stats AS bs \nJOIN build_tasks \n ON bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 1 AND build_tasks.build_id = $build_id ", + "refId": "logs_processing", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n SUM(end_ts - start_ts) AS packages_processing\nFROM web_node_stats AS bs \nJOIN build_tasks \n ON bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 1 AND build_tasks.build_id = $build_id ", + "refId": "packages_procession", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Duration (%)", + "type": "piechart" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#61a69d", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 13 + }, + "id": 21, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "hide": false, + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as upload\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 0 AND build_tasks.build_id = $build_id ", + "refId": "upload", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "start_ts", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "build_node_stats", + "urlPath": "" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as build_srpm\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 2 AND build_tasks.build_id = $build_id ", + "refId": "build_srpm", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as git_checkout\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 3 AND build_tasks.build_id = $build_id ", + "refId": "git_checkout", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as build_binaries\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 4 AND build_tasks.build_id = $build_id ", + "refId": "build_binaries", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as notarize_artifacts\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 7 AND build_tasks.build_id = $build_id ", + "refId": "cas_notarize_artifacts", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n sum(end_ts - start_ts) as source_authenticate\nFROM build_node_stats bs\nJOIN build_tasks \n on bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 8 AND build_tasks.build_id = $build_id ", + "refId": "cas_source_authenticate", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n SUM(end_ts - start_ts) AS logs_processing\nFROM web_node_stats AS bs \nJOIN build_tasks \n ON bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 1 AND build_tasks.build_id = $build_id ", + "refId": "logs_processing", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT \n SUM(end_ts - start_ts) AS packages_processing\nFROM web_node_stats AS bs \nJOIN build_tasks \n ON bs.build_task_id = build_tasks.id\nWHERE stat_name_id = 1 AND build_tasks.build_id = $build_id ", + "refId": "packages_procession", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Duration (absolute)", + "type": "bargauge" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 18, + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT\n bt.id,\n bt.name,\n arch_enum.value AS arch,\n status_enum.value AS status,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n bt.finished_at - bt.started_at AS duration \nFROM build_tasks AS bt\nJOIN build_task_status_enum AS status_enum ON bt.status_id = status_enum.id\nJOIN arch_enum on bt.arch_id = arch_enum.id\nWHERE bt.build_id = $build_id;", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "All build tasks", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "(.*duration)|(wait time)" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 70 + }, + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/vtQClqxVk/build-task-details?orgId=1&var-build_task=${__value.raw}\n\n" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "arch" + }, + "properties": [ + { + "id": "custom.width", + "value": 111 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "build id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}\n\n\n" + } + ] + }, + { + "id": "custom.width", + "value": 102 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 75 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "task duration" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 25, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "task duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT\n bt.id,\n bt.name,\n arch_enum.value AS arch,\n bt.started_at * 1000 AS started,\n bt.finished_at * 1000 AS finished,\n task_duration AS \"task duration\",\n web_node_duration AS \"web node duration\",\n build_node_duration AS \"build node duration\",\n task_duration - web_node_duration - build_node_duration as \"wait time\"\n FROM build_tasks AS bt\n JOIN arch_enum on bt.arch_id = arch_enum.id \n LEFT JOIN \n (\n SELECT\n bt.id,\n bt.finished_at - bt.started_at AS task_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM web_node_stats AS ws \n WHERE ws.build_task_id = bt.id AND stat_name_id=0) AS web_node_duration,\n (SELECT SUM(end_ts - start_ts) \n FROM build_node_stats AS bs \n WHERE bs.build_task_id = bt.id AND stat_name_id=6) AS build_node_duration\n FROM build_tasks AS bt\n WHERE bt.build_id = $build_id AND status_id = 2\n GROUP BY bt.id\n ) as d\n ON bt.id = d.id\n WHERE bt.build_id = $build_id AND status_id = 2", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Completed build tasks", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" + } + ], + "title": "Build tasks", + "type": "row" } ], + "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], @@ -232,13 +2399,13 @@ ] }, "time": { - "from": "now-6h", - "to": "now" + "from": "2023-03-09T18:59:42.117Z", + "to": "2023-03-10T18:59:42.117Z" }, "timepicker": {}, "timezone": "", "title": "Build details", "uid": "dmVtrz-4k", - "version": 8, + "version": 21, "weekStart": "" } \ No newline at end of file diff --git a/grafana-dashbords/Build task details.json b/grafana-dashbords/Build task details.json index a4c270a..2249199 100644 --- a/grafana-dashbords/Build task details.json +++ b/grafana-dashbords/Build task details.json @@ -119,6 +119,23 @@ "value": "s" } ] + }, + { + "matcher": { + "id": "byName", + "options": "build_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "", + "url": "/d/dmVtrz-4k/build-details?orgId=1&var-build_id=${__value.raw}\n\n" + } + ] + } + ] } ] }, @@ -612,7 +629,7 @@ "type": "bargauge" }, { - "collapsed": false, + "collapsed": true, "gridPos": { "h": 1, "w": 24, @@ -620,308 +637,308 @@ "y": 12 }, "id": 8, - "panels": [], + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "finished" + }, + "properties": [ + { + "id": "custom.width", + "value": 235 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "started" + }, + "properties": [ + { + "id": "custom.width", + "value": 205 + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "started" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT \n enum.value,\n stats.start_ts * 1000 AS started,\n stats.end_ts * 1000 AS finished,\n stats.end_ts - stats.start_ts AS duration\nFROM web_node_stats AS stats\nINNER JOIN web_node_stats_enum AS enum\n ON stats.stat_name_id = enum.id\nWHERE build_task_id = $build_task", + "refId": "web node stats", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Web node stats", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "duration" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "started" + }, + "properties": [ + { + "id": "custom.width", + "value": 200 + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 3, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "duration" + } + ] + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "cacheDurationSeconds": 300, + "datasource": { + "type": "postgres", + "uid": "${DS_POSTGRESQL}" + }, + "editorMode": "code", + "fields": [ + { + "jsonPath": "" + } + ], + "format": "table", + "method": "GET", + "queryParams": "", + "rawQuery": true, + "rawSql": "SELECT enum.value,\n stats.start_ts * 1000 AS started,\n stats.end_ts * 1000 AS finished,\n stats.end_ts - stats.start_ts AS duration\nFROM build_node_stats AS stats\nINNER JOIN build_node_stats_enum AS enum\n ON stats.stat_name_id = enum.id\nWHERE build_task_id = $build_task", + "refId": "web node stats", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "urlPath": "" + } + ], + "title": "Build node stats", + "transformations": [ + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "started" + }, + { + "destinationType": "time", + "targetField": "finished" + } + ], + "fields": {} + } + } + ], + "type": "table" + } + ], "title": "Details", "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_POSTGRESQL}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": true, - "inspect": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "unit", - "value": "s" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "finished" - }, - "properties": [ - { - "id": "custom.width", - "value": 235 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "started" - }, - "properties": [ - { - "id": "custom.width", - "value": 205 - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "started" - } - ] - }, - "pluginVersion": "9.3.2", - "targets": [ - { - "cacheDurationSeconds": 300, - "datasource": { - "type": "postgres", - "uid": "${DS_POSTGRESQL}" - }, - "editorMode": "code", - "fields": [ - { - "jsonPath": "" - } - ], - "format": "table", - "method": "GET", - "queryParams": "", - "rawQuery": true, - "rawSql": "SELECT \n enum.value,\n stats.start_ts * 1000 AS started,\n stats.end_ts * 1000 AS finished,\n stats.end_ts - stats.start_ts AS duration\nFROM web_node_stats AS stats\nINNER JOIN web_node_stats_enum AS enum\n ON stats.stat_name_id = enum.id\nWHERE build_task_id = $build_task", - "refId": "web node stats", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "urlPath": "" - } - ], - "title": "Web node stats", - "transformations": [ - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "started" - }, - { - "destinationType": "time", - "targetField": "finished" - } - ], - "fields": {} - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_POSTGRESQL}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": true, - "inspect": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "unit", - "value": "s" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "started" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "duration" - } - ] - }, - "pluginVersion": "9.3.2", - "targets": [ - { - "cacheDurationSeconds": 300, - "datasource": { - "type": "postgres", - "uid": "${DS_POSTGRESQL}" - }, - "editorMode": "code", - "fields": [ - { - "jsonPath": "" - } - ], - "format": "table", - "method": "GET", - "queryParams": "", - "rawQuery": true, - "rawSql": "SELECT enum.value,\n stats.start_ts * 1000 AS started,\n stats.end_ts * 1000 AS finished,\n stats.end_ts - stats.start_ts AS duration\nFROM build_node_stats AS stats\nINNER JOIN build_node_stats_enum AS enum\n ON stats.stat_name_id = enum.id\nWHERE build_task_id = $build_task", - "refId": "web node stats", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "urlPath": "" - } - ], - "title": "Build node stats", - "transformations": [ - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "started" - }, - { - "destinationType": "time", - "targetField": "finished" - } - ], - "fields": {} - } - } - ], - "type": "table" } ], "schemaVersion": 37, @@ -958,6 +975,6 @@ "timezone": "", "title": "Build task details", "uid": "vtQClqxVk", - "version": 34, + "version": 37, "weekStart": "" } \ No newline at end of file