2023-03-07 16:48:19 +00:00
{
"__inputs" : [
{
"name" : "DS_POSTGRESQL" ,
"label" : "PostgreSQL" ,
"description" : "" ,
"type" : "datasource" ,
"pluginId" : "postgres" ,
"pluginName" : "PostgreSQL"
2023-03-07 23:02:25 +00:00
} ,
{
"name" : "DS_EXPRESSION" ,
"label" : "Expression" ,
"description" : "" ,
"type" : "datasource" ,
"pluginId" : "__expr__"
2023-03-07 16:48:19 +00:00
}
] ,
"__elements" : { } ,
"__requires" : [
2023-03-07 23:02:25 +00:00
{
"type" : "datasource" ,
"id" : "__expr__" ,
"version" : "1.0.0"
} ,
2023-03-07 16:48:19 +00:00
{
"type" : "panel" ,
"id" : "bargauge" ,
"name" : "Bar gauge" ,
"version" : ""
} ,
{
"type" : "grafana" ,
"id" : "grafana" ,
"name" : "Grafana" ,
"version" : "9.3.2"
} ,
2023-03-22 10:30:12 +00:00
{
"type" : "panel" ,
"id" : "piechart" ,
"name" : "Pie chart" ,
"version" : ""
} ,
2023-03-07 16:48:19 +00:00
{
"type" : "datasource" ,
"id" : "postgres" ,
"name" : "PostgreSQL" ,
"version" : "1.0.0"
} ,
{
"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"
}
]
} ,
2023-03-07 23:02:25 +00:00
"editable" : false ,
2023-03-07 16:48:19 +00:00
"fiscalYearStartMonth" : 0 ,
"graphTooltip" : 0 ,
"id" : null ,
"links" : [ ] ,
"liveNow" : false ,
"panels" : [
2023-03-22 10:30:12 +00:00
{
"gridPos" : {
"h" : 1 ,
"w" : 24 ,
"x" : 0 ,
"y" : 0
} ,
"id" : 28 ,
"title" : "Build task" ,
"type" : "row"
} ,
2023-03-07 16:48:19 +00:00
{
"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"
}
]
2023-03-10 10:24:17 +00:00
} ,
{
"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"
}
]
}
]
2023-03-07 16:48:19 +00:00
}
]
} ,
"gridPos" : {
"h" : 3 ,
"w" : 24 ,
"x" : 0 ,
2023-03-22 10:30:12 +00:00
"y" : 1
2023-03-07 16:48:19 +00:00
} ,
"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" : ""
}
] ,
2023-03-22 10:30:12 +00:00
"title" : "Build task" ,
2023-03-07 16:48:19 +00:00
"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"
} ,
2023-03-09 12:33:02 +00:00
"overrides" : [
{
"matcher" : {
"id" : "byName" ,
"options" : "wait time"
} ,
"properties" : [
{
"id" : "color" ,
"value" : {
"fixedColor" : "dark-red" ,
"mode" : "fixed"
}
}
]
}
]
2023-03-07 16:48:19 +00:00
} ,
"gridPos" : {
2023-03-22 10:30:12 +00:00
"h" : 8 ,
2023-03-07 23:02:25 +00:00
"w" : 24 ,
2023-03-07 16:48:19 +00:00
"x" : 0 ,
2023-03-22 10:30:12 +00:00
"y" : 4
2023-03-07 16:48:19 +00:00
} ,
"id" : 12 ,
"options" : {
"displayMode" : "gradient" ,
"minVizHeight" : 10 ,
"minVizWidth" : 0 ,
"orientation" : "auto" ,
"reduceOptions" : {
"calcs" : [
"lastNotNull"
] ,
"fields" : "" ,
"values" : false
} ,
"showUnfilled" : false
} ,
"pluginVersion" : "9.3.2" ,
"targets" : [
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"format" : "table" ,
2023-03-09 12:33:02 +00:00
"hide" : false ,
2023-03-07 16:48:19 +00:00
"rawQuery" : true ,
2023-03-09 12:33:02 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"sql" : {
"columns" : [
{
2023-03-09 12:33:02 +00:00
"parameters" : [ ] ,
2023-03-07 16:48:19 +00:00
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
2023-03-09 12:33:02 +00:00
}
2023-03-07 16:48:19 +00:00
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"format" : "table" ,
"hide" : false ,
"rawQuery" : true ,
2023-03-09 12:33:02 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"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 ,
2023-03-09 12:33:02 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"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" ,
2023-03-07 23:02:25 +00:00
"hide" : false ,
2023-03-07 16:48:19 +00:00
"rawQuery" : true ,
2023-03-07 23:02:25 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"format" : "table" ,
2023-03-07 23:02:25 +00:00
"hide" : false ,
2023-03-07 16:48:19 +00:00
"rawQuery" : true ,
2023-03-09 12:33:02 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"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 ,
2023-03-09 12:33:02 +00:00
"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" ,
2023-03-07 16:48:19 +00:00
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
} ,
{
2023-03-09 12:33:02 +00:00
"cacheDurationSeconds" : 300 ,
2023-03-07 16:48:19 +00:00
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
2023-03-09 12:33:02 +00:00
"fields" : [
{
"jsonPath" : ""
}
] ,
2023-03-07 16:48:19 +00:00
"format" : "table" ,
2023-03-09 12:33:02 +00:00
"method" : "GET" ,
"queryParams" : "" ,
2023-03-07 16:48:19 +00:00
"rawQuery" : true ,
2023-03-09 12:33:02 +00:00
"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" : true ,
"rawQuery" : true ,
"rawSql" : "SELECT end_ts - start_ts as build_node_task\nFROM build_node_stats \nWHERE build_task_id = $build_task and stat_name_id = 6" ,
"refId" : "build_node_task" ,
2023-03-07 16:48:19 +00:00
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
2023-03-09 12:33:02 +00:00
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"format" : "table" ,
"hide" : true ,
"rawQuery" : true ,
"rawSql" : "SELECT end_ts - start_ts as web_node_task\nFROM web_node_stats\nWHERE build_task_id = $build_task and stat_name_id = 0" ,
"refId" : "web_node_task" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"format" : "table" ,
"hide" : true ,
"rawQuery" : true ,
"rawSql" : "SELECT\n finished_at - started_at AS duration \nFROM build_tasks \nWHERE id = $build_task;" ,
"refId" : "task_diration" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
} ,
{
"datasource" : {
"type" : "__expr__" ,
"uid" : "${DS_EXPRESSION}"
} ,
"expression" : "$task_diration - $build_node_task - $web_node_task" ,
"hide" : false ,
"refId" : "wait time" ,
"type" : "math"
2023-03-07 16:48:19 +00:00
}
] ,
2023-03-07 23:02:25 +00:00
"title" : "Task duration" ,
2023-03-07 16:48:19 +00:00
"type" : "bargauge"
} ,
2023-03-07 23:02:25 +00:00
{
2023-03-22 10:30:12 +00:00
"collapsed" : false ,
2023-03-07 23:02:25 +00:00
"gridPos" : {
"h" : 1 ,
"w" : 24 ,
"x" : 0 ,
"y" : 12
} ,
2023-03-22 10:30:12 +00:00
"id" : 22 ,
"panels" : [ ] ,
"title" : "Test tasks" ,
"type" : "row"
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"fieldConfig" : {
"defaults" : {
"color" : {
"fixedColor" : "blue" ,
"mode" : "fixed"
} ,
"mappings" : [ ] ,
"thresholds" : {
"mode" : "absolute" ,
"steps" : [
{
"color" : "green" ,
"value" : null
} ,
{
"color" : "red" ,
"value" : 80
}
]
} ,
"unit" : "s"
} ,
"overrides" : [ ]
} ,
"gridPos" : {
"h" : 8 ,
"w" : 11 ,
"x" : 0 ,
"y" : 13
} ,
"id" : 24 ,
"options" : {
"displayMode" : "basic" ,
"minVizHeight" : 10 ,
"minVizWidth" : 0 ,
"orientation" : "horizontal" ,
"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 \n enum.value AS \"step name\",\n SUM(tss.finish_ts - tss.start_ts) AS duration\nFROM test_tasks AS tt\nINNER JOIN test_steps_stats AS tss\n ON tt.id = tss.test_task_id\nINNER JOIN test_steps_enum AS enum\n ON tss.stat_name_id = enum.id\nWHERE tt.build_task_id = $build_task\nGROUP BY (enum.value); " ,
"refId" : "A" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
} ,
"urlPath" : ""
}
] ,
"title" : "Test duration (group by test step)" ,
"transformations" : [
{
"id" : "rowsToFields" ,
"options" : { }
}
] ,
"type" : "bargauge"
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"fieldConfig" : {
"defaults" : {
"color" : {
"mode" : "palette-classic"
} ,
"custom" : {
"hideFrom" : {
"legend" : false ,
"tooltip" : false ,
"viz" : false
}
} ,
"mappings" : [ ] ,
"unit" : "s"
} ,
"overrides" : [ ]
} ,
"gridPos" : {
"h" : 8 ,
"w" : 13 ,
"x" : 11 ,
"y" : 13
} ,
"id" : 18 ,
"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" ,
"rawQuery" : true ,
"rawSql" : "SELECT \n tt.package_fullname AS \"package name\",\n SUM(tss.finish_ts - tss.start_ts) AS duration\nFROM test_tasks AS tt\nINNER JOIN test_steps_stats AS tss\n ON tt.id = tss.test_task_id\nWHERE tt.build_task_id = $build_task\nGROUP BY (tt.package_fullname); " ,
"refId" : "A" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
}
}
] ,
"title" : "Tests duration (group by package)" ,
"transformations" : [
{
"id" : "rowsToFields" ,
"options" : {
"mappings" : [ ]
}
}
] ,
"type" : "piechart"
} ,
{
"collapsed" : true ,
"gridPos" : {
"h" : 1 ,
"w" : 24 ,
"x" : 0 ,
"y" : 21
} ,
"id" : 20 ,
2023-03-10 10:24:17 +00:00
"panels" : [
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
2023-03-07 16:48:19 +00:00
} ,
2023-03-10 10:24:17 +00:00
"description" : "" ,
"fieldConfig" : {
"defaults" : {
"color" : {
"mode" : "thresholds"
2023-03-07 23:02:25 +00:00
} ,
2023-03-10 10:24:17 +00:00
"custom" : {
2023-03-22 10:30:12 +00:00
"align" : "left" ,
2023-03-10 10:24:17 +00:00
"displayMode" : "auto" ,
"filterable" : true ,
"inspect" : true
} ,
"mappings" : [ ] ,
"thresholds" : {
"mode" : "absolute" ,
"steps" : [
{
"color" : "green"
} ,
{
"color" : "red" ,
"value" : 80
}
]
2023-03-07 23:02:25 +00:00
}
2023-03-07 16:48:19 +00:00
} ,
2023-03-10 10:24:17 +00:00
"overrides" : [
2023-03-07 16:48:19 +00:00
{
2023-03-10 10:24:17 +00:00
"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
}
]
2023-03-07 16:48:19 +00:00
}
]
} ,
2023-03-10 10:24:17 +00:00
"gridPos" : {
"h" : 5 ,
"w" : 24 ,
"x" : 0 ,
2023-03-22 10:30:12 +00:00
"y" : 22
2023-03-10 10:24:17 +00:00
} ,
"id" : 2 ,
"options" : {
"footer" : {
"fields" : "" ,
"reducer" : [
"sum"
] ,
"show" : false
2023-03-07 16:48:19 +00:00
} ,
2023-03-10 10:24:17 +00:00
"frameIndex" : 1 ,
"showHeader" : true ,
"sortBy" : [
2023-03-07 16:48:19 +00:00
{
2023-03-10 10:24:17 +00:00
"desc" : true ,
"displayName" : "started"
2023-03-07 23:02:25 +00:00
}
]
} ,
2023-03-10 10:24:17 +00:00
"pluginVersion" : "9.3.2" ,
"targets" : [
{
"cacheDurationSeconds" : 300 ,
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"fields" : [
{
"jsonPath" : ""
}
] ,
"format" : "table" ,
"method" : "GET" ,
"queryParams" : "" ,
"rawQuery" : true ,
2023-03-22 10:30:12 +00:00
"rawSql" : "SELECT \n enum.value as step,\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" ,
2023-03-10 10:24:17 +00:00
"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" : { }
2023-03-07 16:48:19 +00:00
}
2023-03-10 10:24:17 +00:00
}
2023-03-07 23:02:25 +00:00
] ,
2023-03-10 10:24:17 +00:00
"type" : "table"
2023-03-07 16:48:19 +00:00
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
2023-03-10 10:24:17 +00:00
"description" : "" ,
"fieldConfig" : {
"defaults" : {
"color" : {
"mode" : "thresholds"
2023-03-07 23:02:25 +00:00
} ,
2023-03-10 10:24:17 +00:00
"custom" : {
2023-03-22 10:30:12 +00:00
"align" : "left" ,
2023-03-10 10:24:17 +00:00
"displayMode" : "auto" ,
"filterable" : true ,
"inspect" : true
2023-03-07 16:48:19 +00:00
} ,
2023-03-10 10:24:17 +00:00
"mappings" : [ ] ,
"thresholds" : {
"mode" : "absolute" ,
"steps" : [
{
"color" : "green"
} ,
{
"color" : "red" ,
"value" : 80
}
]
2023-03-07 16:48:19 +00:00
}
} ,
2023-03-10 10:24:17 +00:00
"overrides" : [
2023-03-07 16:48:19 +00:00
{
2023-03-10 10:24:17 +00:00
"matcher" : {
"id" : "byName" ,
"options" : "duration"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "s"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "started"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 200
}
]
2023-03-07 16:48:19 +00:00
}
]
2023-03-07 23:02:25 +00:00
} ,
2023-03-10 10:24:17 +00:00
"gridPos" : {
2023-03-22 10:30:12 +00:00
"h" : 8 ,
2023-03-10 10:24:17 +00:00
"w" : 24 ,
"x" : 0 ,
2023-03-22 10:30:12 +00:00
"y" : 27
2023-03-10 10:24:17 +00:00
} ,
"id" : 3 ,
"options" : {
"footer" : {
"fields" : "" ,
"reducer" : [
"sum"
] ,
"show" : false
2023-03-07 23:02:25 +00:00
} ,
2023-03-10 10:24:17 +00:00
"frameIndex" : 1 ,
"showHeader" : true ,
"sortBy" : [
2023-03-07 23:02:25 +00:00
{
2023-03-10 10:24:17 +00:00
"desc" : true ,
"displayName" : "duration"
2023-03-07 23:02:25 +00:00
}
]
2023-03-07 16:48:19 +00:00
} ,
2023-03-10 10:24:17 +00:00
"pluginVersion" : "9.3.2" ,
"targets" : [
2023-03-07 16:48:19 +00:00
{
2023-03-10 10:24:17 +00:00
"cacheDurationSeconds" : 300 ,
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"editorMode" : "code" ,
"fields" : [
{
"jsonPath" : ""
}
] ,
"format" : "table" ,
"method" : "GET" ,
"queryParams" : "" ,
"rawQuery" : true ,
2023-03-22 10:30:12 +00:00
"rawSql" : "SELECT enum.value AS step,\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" ,
2023-03-10 10:24:17 +00:00
"refId" : "web node stats" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
} ,
"urlPath" : ""
2023-03-07 16:48:19 +00:00
}
] ,
2023-03-10 10:24:17 +00:00
"title" : "Build node stats" ,
"transformations" : [
{
"id" : "convertFieldType" ,
"options" : {
"conversions" : [
{
"destinationType" : "time" ,
"targetField" : "started"
} ,
{
"destinationType" : "time" ,
"targetField" : "finished"
}
] ,
"fields" : { }
2023-03-07 16:48:19 +00:00
}
2023-03-10 10:24:17 +00:00
}
] ,
"type" : "table"
2023-03-07 16:48:19 +00:00
}
] ,
2023-03-22 10:30:12 +00:00
"title" : "Details: build task" ,
"type" : "row"
} ,
{
"collapsed" : true ,
"gridPos" : {
"h" : 1 ,
"w" : 24 ,
"x" : 0 ,
"y" : 22
} ,
"id" : 30 ,
"panels" : [
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"fieldConfig" : {
"defaults" : {
"color" : {
"mode" : "thresholds"
} ,
"custom" : {
"align" : "left" ,
"displayMode" : "auto" ,
"filterable" : true ,
"inspect" : false
} ,
"mappings" : [ ] ,
"thresholds" : {
"mode" : "absolute" ,
"steps" : [
{
"color" : "green"
} ,
{
"color" : "red" ,
"value" : 80
}
]
}
} ,
"overrides" : [
{
"matcher" : {
"id" : "byName" ,
"options" : "package"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 389
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "id"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 72
} ,
{
"id" : "links" ,
"value" : [
{
"title" : "" ,
"url" : "/d/8nFXlkB4z/test-task-details?orgId=1&var-id=${__value.raw}"
}
]
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "revision"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 119
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "duration"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "s"
}
]
}
]
} ,
"gridPos" : {
"h" : 5 ,
"w" : 24 ,
"x" : 0 ,
"y" : 23
} ,
"id" : 26 ,
"options" : {
"footer" : {
"fields" : "" ,
"reducer" : [
"sum"
] ,
"show" : false
} ,
"showHeader" : true ,
"sortBy" : [
{
"desc" : true ,
"displayName" : "id"
}
]
} ,
"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 DISTINCT tt.id,\n tt.package_fullname AS package,\n tt.revision,\n enum.value AS \"status\",\n tt.started_at * 1000 AS \"started at\",\n tf.finished_at * 1000 AS \"finished at\", \n tf.finished_at - tt.started_at AS duration\nFROM test_tasks AS tt\nINNER JOIN test_steps_stats AS tss\n ON tt.id = tss.test_task_id\nINNER JOIN test_tasks_status_enum AS enum\n ON tt.status_id = enum.id\nINNER JOIN \n (SELECT \n tss.test_task_id, \n MAX(tss.finish_ts) AS finished_at \n FROM test_steps_stats AS tss\n INNER JOIN test_tasks AS tt\n ON tss.test_task_id = tt.id\n WHERE tt.build_task_id = $build_task\n GROUP BY tss.test_task_id) AS tf\n ON tf.test_task_id = tt.id\nWHERE tt.build_task_id = $build_task; " ,
"refId" : "A" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
} ,
"urlPath" : ""
}
] ,
"title" : "Test tasks" ,
"transformations" : [
{
"id" : "convertFieldType" ,
"options" : {
"conversions" : [
{
"destinationType" : "time" ,
"targetField" : "started at"
} ,
{
"destinationType" : "time" ,
"targetField" : "finished at"
}
] ,
"fields" : { }
}
}
] ,
"type" : "table"
} ,
{
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
"fieldConfig" : {
"defaults" : {
"color" : {
"mode" : "thresholds"
} ,
"custom" : {
"align" : "left" ,
"displayMode" : "auto" ,
"filterable" : true ,
"inspect" : false
} ,
"mappings" : [ ] ,
"thresholds" : {
"mode" : "absolute" ,
"steps" : [
{
"color" : "green"
} ,
{
"color" : "red" ,
"value" : 80
}
]
}
} ,
"overrides" : [
{
"matcher" : {
"id" : "byName" ,
"options" : "test task id"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 159
} ,
{
"id" : "links" ,
"value" : [
{
"title" : "" ,
"url" : "/d/8nFXlkB4z/test-task-details?orgId=1&var-id=${__value.raw}"
}
]
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "duration"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "s"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "package name"
} ,
"properties" : [
{
"id" : "custom.width" ,
"value" : 408
}
]
}
]
} ,
"gridPos" : {
"h" : 6 ,
"w" : 24 ,
"x" : 0 ,
"y" : 28
} ,
"id" : 16 ,
"options" : {
"footer" : {
"fields" : "" ,
"reducer" : [
"sum"
] ,
"show" : false
} ,
"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 \n tt.package_fullname AS \"package name\",\n tss.test_task_id AS \"test task id\", \n enum.value AS \"step name\",\n tss.start_ts * 1000 AS started,\n tss.finish_ts * 1000 AS finished,\n tss.finish_ts - tss.start_ts AS duration\nFROM test_tasks AS tt\nINNER JOIN test_steps_stats AS tss\n ON tt.id = tss.test_task_id\nINNER JOIN test_steps_enum AS enum\n ON tss.stat_name_id = enum.id\nWHERE tt.build_task_id = $build_task; " ,
"refId" : "A" ,
"sql" : {
"columns" : [
{
"parameters" : [ ] ,
"type" : "function"
}
] ,
"groupBy" : [
{
"property" : {
"type" : "string"
} ,
"type" : "groupBy"
}
] ,
"limit" : 50
} ,
"urlPath" : ""
}
] ,
"title" : "Test steps" ,
"transformations" : [
{
"id" : "convertFieldType" ,
"options" : {
"conversions" : [
{
"destinationType" : "time" ,
"targetField" : "started"
} ,
{
"destinationType" : "time" ,
"targetField" : "finished"
}
] ,
"fields" : { }
}
}
] ,
"type" : "table"
}
] ,
"title" : "Details: test tasks" ,
2023-03-10 10:24:17 +00:00
"type" : "row"
2023-03-07 16:48:19 +00:00
}
] ,
"schemaVersion" : 37 ,
"style" : "dark" ,
"tags" : [ ] ,
"templating" : {
"list" : [
{
"current" : { } ,
"datasource" : {
"type" : "postgres" ,
"uid" : "${DS_POSTGRESQL}"
} ,
2023-03-07 23:02:25 +00:00
"definition" : "SELECT id from build_tasks ORDER BY id" ,
2023-03-07 16:48:19 +00:00
"hide" : 0 ,
"includeAll" : false ,
"multi" : false ,
"name" : "build_task" ,
"options" : [ ] ,
2023-03-07 23:02:25 +00:00
"query" : "SELECT id from build_tasks ORDER BY id" ,
2023-03-07 16:48:19 +00:00
"refresh" : 1 ,
"regex" : "" ,
"skipUrlSync" : false ,
"sort" : 0 ,
"type" : "query"
}
]
} ,
"time" : {
"from" : "now-6h" ,
"to" : "now"
} ,
"timepicker" : { } ,
"timezone" : "" ,
"title" : "Build task details" ,
"uid" : "vtQClqxVk" ,
2023-03-22 10:30:12 +00:00
"version" : 61 ,
2023-03-07 16:48:19 +00:00
"weekStart" : ""
}