1
0
Fork 0
llvm-premerge-checks/scripts/buildkite/analyze_jobs.ipynb

840 lines
57 KiB
Text
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## License\n",
"\n",
"Copyright 2020 Google LLC\n",
"\n",
"Licensed under the the Apache License v2.0 with LLVM Exceptions (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
"https://llvm.org/LICENSE.txt\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 724,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"import os\n",
"import logging\n",
"import argparse\n",
"import json\n",
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 725,
"metadata": {},
"outputs": [],
"source": [
"cache_file = \"cache.json\"\n",
"token = f'Bearer {os.getenv(\"BUILDKITE_API_TOKEN\")}'\n",
"builds = []"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 726,
"metadata": {
"scrolled": true
},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"loaded 13566 entries\n"
]
}
],
"source": [
"if os.path.exists(cache_file):\n",
" with open(cache_file) as f:\n",
" builds = json.load(f)\n",
" print(f'loaded {len(builds)} entries') "
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 727,
"metadata": {},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"loading page 1\n",
"loading page 2\n",
"loading page 3\n",
"https://buildkite.com/llvm-project/llvm-master-build/builds/723 is running , skipping\n",
"https://buildkite.com/llvm-project/llvm-master-build/builds/721 is running , skipping\n",
"https://buildkite.com/llvm-project/llvm-master-build/builds/719 is running , skipping\n",
"loading page 4\n",
"https://buildkite.com/llvm-project/llvm-master-build/builds/717 is running , skipping\n",
"https://buildkite.com/llvm-project/llvm-master-build/builds/715 is running , skipping\n",
"loading page 5\n",
"loading page 6\n",
"loading page 7\n",
"loading page 8\n",
"loading page 9\n",
"loading page 10\n",
"13706 jobs in total\n",
"saved 13706 entries\n"
]
}
],
"source": [
"# load new jobs from Buildkite API\n",
2020-07-30 09:32:50 +02:00
"max_pages = 2000\n",
"if True:\n",
" existing = set()\n",
" for j in builds:\n",
" existing.add(j['id'])\n",
"\n",
" # uncomment to reset\n",
"# builds = []\n",
"# existing = set()\n",
" page = 1\n",
" stop = False\n",
2020-07-30 09:32:50 +02:00
" while page <= max_pages:\n",
" print('loading page', page)\n",
" re = requests.get('https://api.buildkite.com/v2/organizations/llvm-project/builds',\n",
" params={'page': page},\n",
" headers={'Authorization': token})\n",
" if re.status_code != 200:\n",
" print('response status', re.status_code, re)\n",
" break\n",
" x = re.json()\n",
" if x == []:\n",
" print('empty response')\n",
" break\n",
" for j in x:\n",
" if j['id'] in existing:\n",
2020-07-30 09:32:50 +02:00
"# print('found existing job', j['id'])\n",
" # load some more pages as some of them might be running before and wasn't added. \n",
" max_pages = min(page + 5, max_pages)\n",
" else:\n",
" # skip running jobs \n",
" if (j['state'] == 'running') or (j['state'] == 'scheduled'):\n",
" print(j['web_url'], 'is', j['state'], ', skipping')\n",
" continue\n",
" builds.append(j)\n",
" page += 1\n",
" print(len(builds), 'jobs in total') \n",
" with open(cache_file, 'w') as f:\n",
" json.dump(builds, f)\n",
" print(f'saved {len(builds)} entries')"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 728,
"metadata": {},
"outputs": [],
"source": [
"d = {\n",
" 'id': [],\n",
" 'number': [],\n",
" 'pipeline': [],\n",
"}\n",
"\n",
"jobs = {\n",
" 'pipeline': [],\n",
" 'name': [],\n",
" 'step_key': [],\n",
" 'state': [],\n",
" 'exit_status': [],\n",
" 'agent_id': [],\n",
" \n",
" 'agent_name': [],\n",
" 'runnable_at': [],\n",
" 'started_at': [],\n",
" 'wait_duration': [],\n",
" 'finished_at': [],\n",
" 'run_duration': [],\n",
"}\n",
"\n",
"sec = np.timedelta64(1, 's')\n",
2020-07-30 09:32:50 +02:00
"\n",
"for b in builds:\n",
2020-07-30 09:32:50 +02:00
" env = b['env']\n",
" if 'ph_windows_agents' not in env:\n",
" continue\n",
" if 'scripts_branch' not in env:\n",
" continue\n",
" d['id'].append(b['id'])\n",
" d['number'].append(b['number'])\n",
" d['pipeline'].append(b['pipeline']['slug'])\n",
" for x in b['jobs']:\n",
" if x['state'] in ['waiting_failed', 'canceled', 'skipped', 'broken']:\n",
" continue\n",
" try:\n",
" jobs['pipeline'].append(b['pipeline']['slug'])\n",
" jobs['name'].append(x['name'])\n",
" jobs['step_key'].append(x['step_key'] if 'step_key' in x else '')\n",
" jobs['state'].append(x['state'] )\n",
" jobs['exit_status'].append(x['exit_status'] if 'exit_status' in x else -1)\n",
" jobs['agent_id'].append(x['agent']['id'] if 'agent' in x else '')\n",
" jobs['agent_name'].append(x['agent']['name'] if 'agent' in x else '')\n",
" runnable = np.datetime64(x['runnable_at'].replace('Z', ''))\n",
" started = np.datetime64(x['started_at'].replace('Z', ''))\n",
" finished = np.datetime64(x['finished_at'].replace('Z', ''))\n",
" jobs['runnable_at'].append(runnable)\n",
" jobs['started_at'].append(started)\n",
" jobs['wait_duration'].append((started - runnable) / sec)\n",
" jobs['finished_at'].append(finished)\n",
" jobs['run_duration'].append((finished - started) / sec)\n",
" except Exception as e:\n",
" print(x)\n",
" raise e \n",
"jobs = pd.DataFrame(jobs)"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 729,
"metadata": {},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"data": {
"text/plain": [
"array(['llvm-master-build'], dtype=object)"
]
},
"execution_count": 729,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"jobs.pipeline.unique()"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 730,
"metadata": {},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>pipeline</th>\n",
" <th>name</th>\n",
" <th>step_key</th>\n",
" <th>state</th>\n",
" <th>exit_status</th>\n",
" <th>agent_id</th>\n",
" <th>agent_name</th>\n",
" <th>runnable_at</th>\n",
" <th>started_at</th>\n",
" <th>wait_duration</th>\n",
" <th>finished_at</th>\n",
" <th>run_duration</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:seedling: setup</td>\n",
" <td>None</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>f20d42d3-31cb-4e46-a3d6-699877e7b283</td>\n",
" <td>premerge-debian-77f64f444-fm624-1</td>\n",
" <td>2020-07-27 18:10:16</td>\n",
" <td>2020-07-27 18:15:44.928</td>\n",
" <td>328.928</td>\n",
" <td>2020-07-27 18:15:47.797</td>\n",
" <td>2.869</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:windows: build and test windows</td>\n",
" <td>windows</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>c9e48cee-e909-45b2-aa23-0d7335786499</td>\n",
" <td>we32n1b</td>\n",
" <td>2020-07-27 18:15:47</td>\n",
" <td>2020-07-28 01:36:57.687</td>\n",
" <td>26470.687</td>\n",
" <td>2020-07-28 02:26:08.750</td>\n",
" <td>2951.063</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:seedling: setup</td>\n",
" <td>None</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>f20d42d3-31cb-4e46-a3d6-699877e7b283</td>\n",
" <td>premerge-debian-77f64f444-fm624-1</td>\n",
" <td>2020-07-27 18:10:15</td>\n",
" <td>2020-07-27 18:15:34.989</td>\n",
" <td>319.989</td>\n",
" <td>2020-07-27 18:15:37.721</td>\n",
" <td>2.732</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:windows: build and test windows</td>\n",
" <td>windows</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>d4d0a0a4-255b-4fdd-8aba-abb00ba0bf34</td>\n",
" <td>we16c2b</td>\n",
" <td>2020-07-27 18:15:37</td>\n",
" <td>2020-07-28 03:13:59.996</td>\n",
" <td>32302.996</td>\n",
" <td>2020-07-28 04:14:12.521</td>\n",
" <td>3612.525</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:seedling: setup</td>\n",
" <td>None</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>f20d42d3-31cb-4e46-a3d6-699877e7b283</td>\n",
" <td>premerge-debian-77f64f444-fm624-1</td>\n",
" <td>2020-07-27 18:10:14</td>\n",
" <td>2020-07-27 18:15:25.094</td>\n",
" <td>311.094</td>\n",
" <td>2020-07-27 18:15:27.918</td>\n",
" <td>2.824</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>189</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:windows: build and test windows</td>\n",
" <td>windows</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>42f6f98d-15bd-4ad4-ac48-8626a752a154</td>\n",
" <td>w16c2-1</td>\n",
" <td>2020-07-29 18:22:31</td>\n",
" <td>2020-07-29 20:23:50.686</td>\n",
" <td>7279.686</td>\n",
" <td>2020-07-29 21:23:50.271</td>\n",
" <td>3599.585</td>\n",
" </tr>\n",
" <tr>\n",
" <th>190</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:seedling: setup</td>\n",
" <td>None</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>db5829eb-04bf-4700-9bec-423258de4a7d</td>\n",
" <td>premerge-debian-77f64f444-vxgx4-1</td>\n",
" <td>2020-07-29 18:21:47</td>\n",
" <td>2020-07-29 18:22:09.243</td>\n",
" <td>22.243</td>\n",
" <td>2020-07-29 18:22:12.321</td>\n",
" <td>3.078</td>\n",
" </tr>\n",
" <tr>\n",
" <th>191</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:windows: build and test windows</td>\n",
" <td>windows</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>42f6f98d-15bd-4ad4-ac48-8626a752a154</td>\n",
" <td>w16c2-1</td>\n",
" <td>2020-07-29 18:22:12</td>\n",
" <td>2020-07-29 19:24:00.345</td>\n",
" <td>3708.345</td>\n",
" <td>2020-07-29 20:23:45.967</td>\n",
" <td>3585.622</td>\n",
" </tr>\n",
" <tr>\n",
" <th>192</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:seedling: setup</td>\n",
" <td>None</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>db5829eb-04bf-4700-9bec-423258de4a7d</td>\n",
" <td>premerge-debian-77f64f444-vxgx4-1</td>\n",
" <td>2020-07-29 18:21:45</td>\n",
" <td>2020-07-29 18:21:49.190</td>\n",
" <td>4.190</td>\n",
" <td>2020-07-29 18:21:52.862</td>\n",
" <td>3.672</td>\n",
" </tr>\n",
" <tr>\n",
" <th>193</th>\n",
" <td>llvm-master-build</td>\n",
" <td>:windows: build and test windows</td>\n",
" <td>windows</td>\n",
" <td>passed</td>\n",
" <td>0</td>\n",
" <td>42f6f98d-15bd-4ad4-ac48-8626a752a154</td>\n",
" <td>w16c2-1</td>\n",
" <td>2020-07-29 18:21:52</td>\n",
" <td>2020-07-29 18:21:54.857</td>\n",
" <td>2.857</td>\n",
" <td>2020-07-29 19:23:58.471</td>\n",
" <td>3723.614</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>194 rows × 12 columns</p>\n",
"</div>"
],
"text/plain": [
" pipeline name step_key state \\\n",
"0 llvm-master-build :seedling: setup None passed \n",
"1 llvm-master-build :windows: build and test windows windows passed \n",
"2 llvm-master-build :seedling: setup None passed \n",
"3 llvm-master-build :windows: build and test windows windows passed \n",
"4 llvm-master-build :seedling: setup None passed \n",
".. ... ... ... ... \n",
"189 llvm-master-build :windows: build and test windows windows passed \n",
"190 llvm-master-build :seedling: setup None passed \n",
"191 llvm-master-build :windows: build and test windows windows passed \n",
"192 llvm-master-build :seedling: setup None passed \n",
"193 llvm-master-build :windows: build and test windows windows passed \n",
"\n",
" exit_status agent_id \\\n",
"0 0 f20d42d3-31cb-4e46-a3d6-699877e7b283 \n",
"1 0 c9e48cee-e909-45b2-aa23-0d7335786499 \n",
"2 0 f20d42d3-31cb-4e46-a3d6-699877e7b283 \n",
"3 0 d4d0a0a4-255b-4fdd-8aba-abb00ba0bf34 \n",
"4 0 f20d42d3-31cb-4e46-a3d6-699877e7b283 \n",
".. ... ... \n",
"189 0 42f6f98d-15bd-4ad4-ac48-8626a752a154 \n",
"190 0 db5829eb-04bf-4700-9bec-423258de4a7d \n",
"191 0 42f6f98d-15bd-4ad4-ac48-8626a752a154 \n",
"192 0 db5829eb-04bf-4700-9bec-423258de4a7d \n",
"193 0 42f6f98d-15bd-4ad4-ac48-8626a752a154 \n",
"\n",
" agent_name runnable_at \\\n",
"0 premerge-debian-77f64f444-fm624-1 2020-07-27 18:10:16 \n",
"1 we32n1b 2020-07-27 18:15:47 \n",
"2 premerge-debian-77f64f444-fm624-1 2020-07-27 18:10:15 \n",
"3 we16c2b 2020-07-27 18:15:37 \n",
"4 premerge-debian-77f64f444-fm624-1 2020-07-27 18:10:14 \n",
".. ... ... \n",
"189 w16c2-1 2020-07-29 18:22:31 \n",
"190 premerge-debian-77f64f444-vxgx4-1 2020-07-29 18:21:47 \n",
"191 w16c2-1 2020-07-29 18:22:12 \n",
"192 premerge-debian-77f64f444-vxgx4-1 2020-07-29 18:21:45 \n",
"193 w16c2-1 2020-07-29 18:21:52 \n",
"\n",
" started_at wait_duration finished_at \\\n",
"0 2020-07-27 18:15:44.928 328.928 2020-07-27 18:15:47.797 \n",
"1 2020-07-28 01:36:57.687 26470.687 2020-07-28 02:26:08.750 \n",
"2 2020-07-27 18:15:34.989 319.989 2020-07-27 18:15:37.721 \n",
"3 2020-07-28 03:13:59.996 32302.996 2020-07-28 04:14:12.521 \n",
"4 2020-07-27 18:15:25.094 311.094 2020-07-27 18:15:27.918 \n",
".. ... ... ... \n",
"189 2020-07-29 20:23:50.686 7279.686 2020-07-29 21:23:50.271 \n",
"190 2020-07-29 18:22:09.243 22.243 2020-07-29 18:22:12.321 \n",
"191 2020-07-29 19:24:00.345 3708.345 2020-07-29 20:23:45.967 \n",
"192 2020-07-29 18:21:49.190 4.190 2020-07-29 18:21:52.862 \n",
"193 2020-07-29 18:21:54.857 2.857 2020-07-29 19:23:58.471 \n",
"\n",
" run_duration \n",
"0 2.869 \n",
"1 2951.063 \n",
"2 2.732 \n",
"3 3612.525 \n",
"4 2.824 \n",
".. ... \n",
"189 3599.585 \n",
"190 3.078 \n",
"191 3585.622 \n",
"192 3.672 \n",
"193 3723.614 \n",
"\n",
"[194 rows x 12 columns]"
]
},
"execution_count": 730,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"jobs"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 731,
"metadata": {},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/google/home/goncharov/etc/merge-checks/venv/lib/python3.7/site-packages/ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index.\n",
" \"\"\"Entry point for launching an IPython kernel.\n"
]
}
],
"source": [
2020-07-30 09:32:50 +02:00
"ds = jobs[jobs['pipeline'] == 'llvm-master-build'][jobs['step_key'] == 'windows'][jobs['state']=='passed'][~jobs['agent_name'].str.startswith('buildkite-')][jobs['started_at'] > np.datetime64('2020-01-22')]\n",
"ds = ds.drop_duplicates()\n",
"# remove one slowest run (repo checkout)\n",
"# t = ds.loc[ds.groupby([\"agent_name\"])[\"run_duration\"].idxmax()]\n",
"# ds = pd.concat([ds, t]).drop_duplicates(keep=False)"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 732,
"metadata": {
"scrolled": false
},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/google/home/goncharov/etc/merge-checks/venv/lib/python3.7/site-packages/seaborn/categorical.py:2971: UserWarning: The `split` parameter has been renamed to `dodge`.\n",
" warnings.warn(msg, UserWarning)\n"
]
},
{
"data": {
"text/plain": [
"(0.0, 5877.15505)"
]
},
"execution_count": 732,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAn8AAAJNCAYAAABA/BNdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzde5xdZX3v8c9v9kyukytJSAiQ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ByJiSUTcFxE/rL1+c2a+sIDkLuDwbmONjohfRsQjEfF3EeElcEmqg/KdV8GWtupOpUz5jivpvOWb1eAHUN5J5y3fIMudPY+748pq0AOodFJu/ace+53zv012bN9P70I6eNQ78MwH5ta2W4DmiGiqtS0BPg2cl5mnAa3AZX2MNwsYFxG3RMTCiPgAQEScUBtrXmbOBv60l2MvAn7Vbf8M4E+A46leXn5HbyeMiIsjojUiWtva2vp8w5KknnLL2p4N5Z3k5jU929o3QWd7z+M273JcVnrud2yH9s37qEqpOOod/hYCcyJiNLADWEA1BM4FtlMNXndExGLgg8C0PsZrBOYAbwLeCHwmImYB84CrX1gbmJkbuh8UEe+vnffL3ZrvzswnM7MM/Bh4bW8nzMwrM7MlM1smTvTjiCTp5Wo49rwe+zFpFqXjL+jZZ/qZxNDmlzyOUYf2HOewk4hRfa3+kbSruq75y8yOiFgGXAjcSXW271xgBrAMuCEz3/MyhlwFrM/MrcDWiLgNmP1SB0TEecCngNdl5o7u5e1a7suoQ5LUT42nvosoDaH8xG00jD2i+mkfw8fC8DGUl99NlJqICcdQWfsYDZNmdh1XOv39xJARlJ+8g4ZDjqLh9Pe
"text/plain": [
"<Figure size 720x720 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
2020-07-30 09:32:50 +02:00
"fig, ax = plt.subplots(figsize=(10,10)) # size of the plot (width, height)\n",
"\n",
2020-07-30 09:32:50 +02:00
"sns.swarmplot(\n",
" ax=ax,\n",
" x='run_duration',\n",
" y='agent_name',\n",
" split=True,\n",
" data=ds)\n",
"\n",
"plt.xlim(0, None)"
]
},
{
"cell_type": "code",
2020-07-30 09:32:50 +02:00
"execution_count": 733,
"metadata": {
"scrolled": false
},
2020-07-30 09:32:50 +02:00
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead tr th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe thead tr:last-of-type th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr>\n",
" <th></th>\n",
" <th>median</th>\n",
" <th>mean</th>\n",
" <th>std</th>\n",
" <th>count_nonzero</th>\n",
" </tr>\n",
" <tr>\n",
" <th></th>\n",
" <th>run_duration</th>\n",
" <th>run_duration</th>\n",
" <th>run_duration</th>\n",
" <th>run_duration</th>\n",
" </tr>\n",
" <tr>\n",
" <th>agent_name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>we16n1a</th>\n",
" <td>4982.7380</td>\n",
" <td>5013.848800</td>\n",
" <td>396.926050</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we16n1b</th>\n",
" <td>4692.7930</td>\n",
" <td>4707.102222</td>\n",
" <td>121.624149</td>\n",
" <td>9.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>w16n2-1</th>\n",
" <td>3846.2090</td>\n",
" <td>3881.809600</td>\n",
" <td>81.657742</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we16c2a</th>\n",
" <td>3779.3110</td>\n",
" <td>3858.373400</td>\n",
" <td>183.822602</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we16c2b</th>\n",
" <td>3593.5200</td>\n",
" <td>3615.016200</td>\n",
" <td>66.460005</td>\n",
" <td>10.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>w16c2-1</th>\n",
" <td>3585.6220</td>\n",
" <td>3612.092800</td>\n",
" <td>63.120688</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we16n1c</th>\n",
" <td>3068.6440</td>\n",
" <td>3085.927100</td>\n",
" <td>1412.888086</td>\n",
" <td>10.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we32n1b</th>\n",
" <td>2964.4520</td>\n",
" <td>2964.178300</td>\n",
" <td>59.215712</td>\n",
" <td>10.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we32n1a</th>\n",
" <td>2880.9180</td>\n",
" <td>3031.068800</td>\n",
" <td>428.110568</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we16c2c</th>\n",
" <td>2366.5155</td>\n",
" <td>2377.441900</td>\n",
" <td>1005.847826</td>\n",
" <td>10.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>we32n1c</th>\n",
" <td>2289.9605</td>\n",
" <td>2275.634700</td>\n",
" <td>629.386804</td>\n",
" <td>10.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>w64</th>\n",
" <td>2282.6860</td>\n",
" <td>2282.769800</td>\n",
" <td>33.481977</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" median mean std count_nonzero\n",
" run_duration run_duration run_duration run_duration\n",
"agent_name \n",
"we16n1a 4982.7380 5013.848800 396.926050 5.0\n",
"we16n1b 4692.7930 4707.102222 121.624149 9.0\n",
"w16n2-1 3846.2090 3881.809600 81.657742 5.0\n",
"we16c2a 3779.3110 3858.373400 183.822602 5.0\n",
"we16c2b 3593.5200 3615.016200 66.460005 10.0\n",
"w16c2-1 3585.6220 3612.092800 63.120688 5.0\n",
"we16n1c 3068.6440 3085.927100 1412.888086 10.0\n",
"we32n1b 2964.4520 2964.178300 59.215712 10.0\n",
"we32n1a 2880.9180 3031.068800 428.110568 5.0\n",
"we16c2c 2366.5155 2377.441900 1005.847826 10.0\n",
"we32n1c 2289.9605 2275.634700 629.386804 10.0\n",
"w64 2282.6860 2282.769800 33.481977 5.0"
]
},
"execution_count": 733,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t = pd.pivot_table(ds, values=['run_duration'], index=['agent_name'],\n",
" aggfunc=[np.median, np.mean, np.std, np.count_nonzero])\n",
"t = t.reindex(t.sort_values(by=('median', 'run_duration'), ascending=False).index)\n",
"t"
]
2020-07-30 09:32:50 +02:00
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
"// TODO: try with w64 w/o AV (temporary disabled)\n",
"w1 - 16 - non ssd 100 + ssd\n",
"w1a - 16 - non ssd 100 + ssd - AV (temp)\n",
"w4a - 16 - non ssd 100 + ssd - AV\n",
"w16-1 - 16 - non sdd 200 + ssd\n",
"w32-1 - 32 - non ssd 100 + ssd\n",
"w32-2 - 32 - non ssd 100 + ssd - AV\n",
"w32-2d - 32 - non ssd 200 + ssd\n",
"w64 - 64 - ssd 200 + ssd \n",
"w64a - 64 - ssd 200 + ssd - AV (temp)\n",
"wh63-3 - 64 low ram - non ssd 100 + ssd - AV\n",
"\n",
"buildkite-windows-16n1-exp\n",
"gcloud beta compute instances create \"${NAME}\" \\\n",
" --project=\"${GCP_PROJECT}\" \\\n",
" --zone=\"${GCP_ZONE}\" \\\n",
" --machine-type=n1-standard-16 \\\n",
" --local-ssd=device-name=local-ssd-0 \\\n",
" --image=windows-server-2019-dc-for-containers-v20200714 \\\n",
" --image-project=windows-cloud \\\n",
" --boot-disk-size=200GB --boot-disk-type=pd-ssd\n",
"\n",
"buildkite-32-experimental-1\n",
"gcloud beta compute instances create \"${NAME}\" \\\n",
" --project=\"${GCP_PROJECT}\" \\\n",
" --zone=\"${GCP_ZONE}\" \\\n",
" --machine-type=n1-standard-32 \\\n",
" --local-ssd=device-name=local-ssd-0 \\\n",
" --image=windows-server-2019-dc-for-containers-v20200714 \\\n",
" --image-project=windows-cloud \\\n",
" --boot-disk-size=200GB --boot-disk-type=pd-ssd\n",
"\n",
" \n",
"buildkite-16c2-exp\n",
"gcloud beta compute instances create \"${NAME}\" \\\n",
" --project=\"${GCP_PROJECT}\" \\\n",
" --zone=\"${GCP_ZONE}\" \\\n",
" --machine-type=c2-standard-16 \\\n",
" --local-ssd=device-name=local-ssd-0 \\\n",
" --local-ssd=interface=SCSI \\\n",
" --image=windows-server-2019-dc-for-containers-v20200714 \\\n",
" --image-project=windows-cloud \\\n",
" --boot-disk-size=200GB --boot-disk-type=pd-ssd\n",
" \n",
"...a: as is D:/ is a workdir (ealy run with full cache build)\n",
"...b: C:/ws as a workdir, no cache\n",
"```\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5rc1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}