This commit is contained in:
yaananth (Yash) 2019-10-16 14:55:58 -04:00
Родитель d8d1f12003
Коммит d9d387b052
5 изменённых файлов: 22 добавлений и 17 удалений

4
.gitignore поставляемый
Просмотреть файл

@ -1,4 +1,6 @@
Kqlmagic_temp_files
.ipynb_checkpoints/*
*.pyc
*.sh
*.sh
.venv
.DS_Store

Просмотреть файл

@ -23,11 +23,11 @@
"outputs": [],
"source": [
"# These are just defaults will be overwritten if you use nimport pip\n",
"start = \"2019-08-08T23:50:00.0000000Z\"\n",
"end = \"2019-08-09T00:24:36.0000000Z\"\n",
"service = \"tfs\"\n",
"hub = \"Build\"\n",
"su = \"tfs-wcus-0\"\n",
"start = \"2019-10-15T20:21:54.0330000Z\"\n",
"end = \"2019-10-15T20:52:21.5370169Z\"\n",
"service = \"pipelines\"\n",
"su = \"pipelines-ghub-eus2-2\"\n",
"hub = \"Actions\"\n",
"url = \"https://notebooksv2.azure.com/yaananth/projects/06OasuNRs6rK/delays.ipynb\"\n",
"baseUrl = \"https://notebooksv2.azure.com/yaananth/projects/06OasuNRs6rK\""
]
@ -511,7 +511,7 @@
"version": "3.7.4"
},
"nteract": {
"version": "0.14.5"
"version": "0.15.0"
}
},
"nbformat": 4,

Просмотреть файл

@ -21,15 +21,15 @@
},
"outputs": [],
"source": [
"su = \"tfs-wcus-0\"\n",
"start = \"2019-08-08T23:50:00.0000000Z\"\n",
"end = \"2019-08-09T00:24:36.0000000Z\"\n",
"su = \"pipelines-ghub-eus2-2\"\n",
"start = \"2019-10-15T20:21:54.0330000Z\"\n",
"end = \"2019-10-15T20:52:21.5370169Z\"\n",
"url = \"https://notebooksv2.azure.com/yaananth/projects/06OasuNRs6rK/delays.ipynb\"\n",
"baseUrl = \"https://notebooksv2.azure.com/yaananth/projects/06OasuNRs6rK\"\n",
"service = \"tfs\"\n",
"hub = \"Build\"\n",
"locationName = \"tfsprodwcus0\"\n",
"mdmAccount = \"VSO-TFS\""
"service = \"pipelines\"\n",
"hub = \"Actions\"\n",
"locationName = \"pipelinesghubeus22\"\n",
"mdmAccount = \"VSO-Pipelines\""
]
},
{

Просмотреть файл

@ -5,6 +5,7 @@ let endTime = todatetime("{end}") + 15min;
let service = "{service}";
let hubName = "{hub}";
let interval = 1m;
let hostId = "{hostId}";
KPI
| where PreciseTimeStamp between (startTime .. endTime)
| where Service =~ service
@ -13,9 +14,11 @@ KPI
| extend DataObj = parsejson(Metrics)
| extend MetricsObjArr = parsejson(DataObj.metrics)
| extend MetricsObj = MetricsObjArr[0]
| extend HostId = tostring(DataObj.hostId)
| extend Name = tostring(MetricsObj.name)
| extend DisplayName = MetricsObj.displayName
| extend Value = todouble(MetricsObj.value)
| where HostId startswith hostId
| project PreciseTimeStamp, DataObj, Name, DisplayName, Value, MetricsObj
| summarize sum(Value) by Name, bin(PreciseTimeStamp, interval)
| render timechart

Просмотреть файл

@ -21,9 +21,9 @@
},
"outputs": [],
"source": [
"triggerTime = \"2019-08-08T23:50:00.0000000Z\"\n",
"scaleUnit = \"tfs-wcus-0\"\n",
"service = \"tfs\"\n",
"triggerTime = \"2019-10-15T20:21:54.0330000Z\"\n",
"scaleUnit = \"pipelines-ghub-eus2-2\"\n",
"service = \"pipelines\"\n",
"lookback = \"1h\"\n",
"region = \"\""
]