1133 lines
27 KiB
JSON
1133 lines
27 KiB
JSON
{
|
|
"__inputs": [
|
|
{
|
|
"name": "DS_POSTGRESQL",
|
|
"label": "PostgreSQL",
|
|
"description": "",
|
|
"type": "datasource",
|
|
"pluginId": "postgres",
|
|
"pluginName": "PostgreSQL"
|
|
},
|
|
{
|
|
"name": "DS_EXPRESSION",
|
|
"label": "Expression",
|
|
"description": "",
|
|
"type": "datasource",
|
|
"pluginId": "__expr__"
|
|
}
|
|
],
|
|
"__elements": {},
|
|
"__requires": [
|
|
{
|
|
"type": "datasource",
|
|
"id": "__expr__",
|
|
"version": "1.0.0"
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "bargauge",
|
|
"name": "Bar gauge",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "grafana",
|
|
"id": "grafana",
|
|
"name": "Grafana",
|
|
"version": "9.3.2"
|
|
},
|
|
{
|
|
"type": "datasource",
|
|
"id": "postgres",
|
|
"name": "PostgreSQL",
|
|
"version": "1.0.0"
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "stat",
|
|
"name": "Stat",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "table",
|
|
"name": "Table",
|
|
"version": ""
|
|
}
|
|
],
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "grafana",
|
|
"uid": "-- Grafana --"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations & Alerts",
|
|
"target": {
|
|
"limit": 100,
|
|
"matchAny": false,
|
|
"tags": [],
|
|
"type": "dashboard"
|
|
},
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"editable": false,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "${DS_POSTGRESQL}"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"align": "auto",
|
|
"displayMode": "auto",
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "duration"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "s"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 3,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 5,
|
|
"options": {
|
|
"footer": {
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true
|
|
},
|
|
"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 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 bt.id = $build_task;",
|
|
"refId": "A",
|
|
"sql": {
|
|
"columns": [
|
|
{
|
|
"parameters": [],
|
|
"type": "function"
|
|
}
|
|
],
|
|
"groupBy": [
|
|
{
|
|
"property": {
|
|
"type": "string"
|
|
},
|
|
"type": "groupBy"
|
|
}
|
|
],
|
|
"limit": 50
|
|
},
|
|
"urlPath": ""
|
|
}
|
|
],
|
|
"title": "Task summary",
|
|
"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": {
|
|
"fixedColor": "#61a69d",
|
|
"mode": "fixed"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 3
|
|
},
|
|
"id": 12,
|
|
"options": {
|
|
"displayMode": "gradient",
|
|
"minVizHeight": 10,
|
|
"minVizWidth": 0,
|
|
"orientation": "auto",
|
|
"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",
|
|
"method": "GET",
|
|
"queryParams": "",
|
|
"rawQuery": true,
|
|
"rawSql": "SELECT end_ts - start_ts as upload\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 0",
|
|
"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 end_ts - start_ts as build_srpm\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 2",
|
|
"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 end_ts - start_ts as git_checkout\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 3",
|
|
"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 end_ts - start_ts as build_binaries\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 4",
|
|
"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 end_ts - start_ts as notarize_artifacts\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 7;",
|
|
"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 end_ts - start_ts as source_authenticate\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 8;",
|
|
"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 end_ts - start_ts as logs_processing\nFROM web_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 1",
|
|
"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 end_ts - start_ts as packages_processing\nFROM web_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 2",
|
|
"refId": "packages_processing",
|
|
"sql": {
|
|
"columns": [
|
|
{
|
|
"parameters": [],
|
|
"type": "function"
|
|
}
|
|
],
|
|
"groupBy": [
|
|
{
|
|
"property": {
|
|
"type": "string"
|
|
},
|
|
"type": "groupBy"
|
|
}
|
|
],
|
|
"limit": 50
|
|
}
|
|
}
|
|
],
|
|
"title": "Task duration",
|
|
"type": "bargauge"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 12
|
|
},
|
|
"id": 8,
|
|
"panels": [],
|
|
"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": []
|
|
},
|
|
"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",
|
|
"value": null
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 11,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 29
|
|
},
|
|
"id": 6,
|
|
"options": {
|
|
"footer": {
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"frameIndex": 1,
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "finished"
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "${DS_POSTGRESQL}"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"fixedColor": "blue",
|
|
"mode": "fixed"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 6,
|
|
"w": 17,
|
|
"x": 3,
|
|
"y": 40
|
|
},
|
|
"id": 14,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto"
|
|
},
|
|
"pluginVersion": "9.3.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "${DS_POSTGRESQL}"
|
|
},
|
|
"editorMode": "code",
|
|
"format": "table",
|
|
"rawQuery": true,
|
|
"rawSql": "SELECT\n bt.finished_at - bt.started_at AS task_duration \nFROM build_tasks AS bt\nWHERE bt.id = $build_task;",
|
|
"refId": "task_duration",
|
|
"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 stats.end_ts - stats.start_ts AS web_node_duration\nFROM web_node_stats AS stats\nWHERE build_task_id = $build_task and stat_name_id=0;",
|
|
"refId": "web_node_duration",
|
|
"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 stats.end_ts - stats.start_ts AS build_node_duration\nFROM build_node_stats AS stats\nWHERE build_task_id = $build_task AND stat_name_id=6",
|
|
"refId": "build_node_duration",
|
|
"sql": {
|
|
"columns": [
|
|
{
|
|
"parameters": [],
|
|
"type": "function"
|
|
}
|
|
],
|
|
"groupBy": [
|
|
{
|
|
"property": {
|
|
"type": "string"
|
|
},
|
|
"type": "groupBy"
|
|
}
|
|
],
|
|
"limit": 50
|
|
}
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "__expr__",
|
|
"uid": "${DS_EXPRESSION}"
|
|
},
|
|
"expression": "$task_duration - ($web_node_duration + $build_node_duration)",
|
|
"hide": false,
|
|
"refId": "Not accounted duration",
|
|
"type": "math"
|
|
}
|
|
],
|
|
"title": "Diff",
|
|
"type": "stat"
|
|
}
|
|
],
|
|
"schemaVersion": 37,
|
|
"style": "dark",
|
|
"tags": [],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {},
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "${DS_POSTGRESQL}"
|
|
},
|
|
"definition": "SELECT id from build_tasks ORDER BY id",
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"multi": false,
|
|
"name": "build_task",
|
|
"options": [],
|
|
"query": "SELECT id from build_tasks ORDER BY id",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"type": "query"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-6h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "",
|
|
"title": "Build task details",
|
|
"uid": "vtQClqxVk",
|
|
"version": 27,
|
|
"weekStart": ""
|
|
} |