305 lines
52 KiB
Text
305 lines
52 KiB
Text
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"id": "german-marathon",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Statuses total time\n",
|
||
|
"Sums the times instances spend in one of each states in the diagram saved as\n",
|
||
|
"\"statuses.drawio\". Unknown times are summed as \"unknown\""
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"id": "boolean-microwave",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import json\n",
|
||
|
"import sys\n",
|
||
|
"import pandas\n",
|
||
|
"import seaborn as sns\n",
|
||
|
"import matplotlib as mpl\n",
|
||
|
"import matplotlib.pyplot as plt"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"id": "activated-messenger",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# QUEUE = set([\"0-2\", \"1-2\", \"assumptions:\", \"1-1\", \"1-0\"])\n",
|
||
|
"# RESUB = set([\"4-1\", \"4-0\", \"5-1\", \"6-1\", \"7-1\", \"8-1\", \"assumptions:\", \"5-0\", \"6-0\", \"7-0\", \\\n",
|
||
|
"# \"8-0\"])\n",
|
||
|
"# READY = set([\"0-3\", \"2-3\", \"0-9\", \"2-9\", \"9-3\", \"2-7\", \"2-8\", \"9-7\", \"9-8\", \\\n",
|
||
|
"# \"9-9\", \"0-7\", \"0-8\", \"assumptions:\", \"2-0\", \"2-4\", \"9-4\", \"9-1\"])\n",
|
||
|
"# RUN = set([\"3-1\", \"3-10\", \"3-4\", \"3-5\", \"3-6\", \"3-7\", \"3-8\", \"10-5\", \"10-6\", \\\n",
|
||
|
"# \"10-7\", \"10-8\", \"10-4\", \"10-10\", \"10-1\", \"assumptions:\", \"3-0\", \"10-0\", \"3-3\"])\n",
|
||
|
"\n",
|
||
|
"QUEUE = set([\"0-2\", \"1-2\"])\n",
|
||
|
"ENDED = set([\"5-1\", \"6-1\", \"7-1\", \"8-1\"])\n",
|
||
|
"READY = set([\"0-3\", \"0-9\", \"2-3\", \"2-9\", \"9-3\", \"9-9\"])\n",
|
||
|
"RUN = set([\"3-1\", \"3-4\", \"3-5\", \"3-6\", \"3-7\", \"3-8\", \"3-10\", \"10-1\", \"10-4\", \"10-5\", \"10-6\", \"10-7\", \"10-8\", \"10-10\"])\n",
|
||
|
"EVICT = set([\"4-1\", \"4-0\"])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"id": "novel-commercial",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"obj = {}\n",
|
||
|
"\n",
|
||
|
"filename=\"/home/claudio/google_2019/thesis_queries/machine_time_waste/a_state_changes.json\"\n",
|
||
|
"\n",
|
||
|
"with open(filename, 'r') as f:\n",
|
||
|
" obj = json.loads(f.read())"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"id": "casual-oasis",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"data = {'Last termination': [], 'time_type': [], 'time_ms': []}\n",
|
||
|
"totals = {}\n",
|
||
|
"\n",
|
||
|
"def to_name(et):\n",
|
||
|
" if et == 4: \n",
|
||
|
" return 'EVICT'\n",
|
||
|
" elif et == 5: \n",
|
||
|
" return 'FAIL'\n",
|
||
|
" elif et == 6:\n",
|
||
|
" return 'FINISH'\n",
|
||
|
" elif et == 7:\n",
|
||
|
" return 'KILL'\n",
|
||
|
" elif et == 8:\n",
|
||
|
" return 'LOST'\n",
|
||
|
" else:\n",
|
||
|
" return 'NO_TERM'\n",
|
||
|
"\n",
|
||
|
"def add_record(et, tt, time):\n",
|
||
|
" data['Last termination'].append(to_name(et))\n",
|
||
|
" data['time_type'].append(tt)\n",
|
||
|
" data['time_ms'].append(time)\n",
|
||
|
" \n",
|
||
|
" \n",
|
||
|
"for pair in obj[\"data\"]:\n",
|
||
|
" s = set()\n",
|
||
|
" qt = et = rt = xt = vt = ut = 0\n",
|
||
|
" \n",
|
||
|
" # print(\"End type \" + str(pair[0])) \n",
|
||
|
" \n",
|
||
|
" pair[0] = 0 if pair[0] is None else pair[0]\n",
|
||
|
" \n",
|
||
|
" x = pair[1]\n",
|
||
|
" for k in x.keys():\n",
|
||
|
" if k in QUEUE:\n",
|
||
|
" qt += x[k]\n",
|
||
|
" elif k in ENDED:\n",
|
||
|
" et += x[k]\n",
|
||
|
" elif k in READY:\n",
|
||
|
" rt += x[k]\n",
|
||
|
" elif k in RUN:\n",
|
||
|
" xt += x[k]\n",
|
||
|
" elif k in EVICT:\n",
|
||
|
" vt += x[k]\n",
|
||
|
" else:\n",
|
||
|
" s.add(k)\n",
|
||
|
" ut += x[k]\n",
|
||
|
" \n",
|
||
|
" add_record(pair[0], 'queued', qt)\n",
|
||
|
" add_record(pair[0], 'ended', et)\n",
|
||
|
" add_record(pair[0], 'ready', rt)\n",
|
||
|
" add_record(pair[0], 'running', xt)\n",
|
||
|
" add_record(pair[0], 'evicted', vt)\n",
|
||
|
" add_record(pair[0], 'unknown', ut)\n",
|
||
|
" totals[pair[0]] = qt + et + rt + xt + vt + ut\n",
|
||
|
" # print(s) \n",
|
||
|
" \n",
|
||
|
"df = pandas.DataFrame(data, columns=['Last termination', 'time_type', 'time_ms'])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"id": "encouraging-acoustic",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Graph 1: Absolute total time spent per status per \"last termination\" type"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"id": "romance-complex",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
" Last termination time_type time_ms\n",
|
||
|
"0 NO_TERM queued 1.515995e-02\n",
|
||
|
"1 NO_TERM ended 0.000000e+00\n",
|
||
|
"2 NO_TERM ready 3.365563e-02\n",
|
||
|
"3 NO_TERM running 9.511017e-01\n",
|
||
|
"4 NO_TERM evicted 0.000000e+00\n",
|
||
|
"5 NO_TERM unknown 8.273546e-05\n",
|
||
|
"6 EVICT queued 2.199883e-02\n",
|
||
|
"7 EVICT ended 7.361000e-08\n",
|
||
|
"8 EVICT ready 6.672357e-03\n",
|
||
|
"9 EVICT running 8.789100e-01\n",
|
||
|
"10 EVICT evicted 1.503149e-05\n",
|
||
|
"11 EVICT unknown 9.240368e-02\n",
|
||
|
"12 FAIL queued 8.517812e-02\n",
|
||
|
"13 FAIL ended 0.000000e+00\n",
|
||
|
"14 FAIL ready 9.300481e-04\n",
|
||
|
"15 FAIL running 6.596810e-01\n",
|
||
|
"16 FAIL evicted 6.492666e-12\n",
|
||
|
"17 FAIL unknown 2.542109e-01\n",
|
||
|
"18 FINISH queued 3.237908e-01\n",
|
||
|
"19 FINISH ended 1.907057e-07\n",
|
||
|
"20 FINISH ready 2.215952e-02\n",
|
||
|
"21 FINISH running 3.951182e-01\n",
|
||
|
"22 FINISH evicted 3.313964e-11\n",
|
||
|
"23 FINISH unknown 2.589313e-01\n",
|
||
|
"24 KILL queued 3.455137e-02\n",
|
||
|
"25 KILL ended 3.509624e-05\n",
|
||
|
"26 KILL ready 4.547064e-03\n",
|
||
|
"27 KILL running 3.297613e-01\n",
|
||
|
"28 KILL evicted 2.820098e-05\n",
|
||
|
"29 KILL unknown 6.310770e-01\n",
|
||
|
"30 LOST queued 3.119403e-05\n",
|
||
|
"31 LOST ended 1.203386e-01\n",
|
||
|
"32 LOST ready 8.201877e-04\n",
|
||
|
"33 LOST running 2.690978e-04\n",
|
||
|
"34 LOST evicted 1.693104e-13\n",
|
||
|
"35 LOST unknown 8.785409e-01\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0, 0.5, 'Total microseconds')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAENCAYAAADDmygoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAABFf0lEQVR4nO3deVyU1f7A8c/MsKmACAjiVoo3w9zFpdwhxdxAIDF3u+WSiXW7JSmJBqWkZe6m5a5lpomimb/c0u7V8qZZYm5XU5RFQARZnGGY3x9cHxkBGXVgAL/v14uXzHm27xmE7zznnOcclcFgMCCEEEKYkdrSAQghhKh6JLkIIYQwO0kuQgghzE6SixBCCLOT5CKEEMLsrCwdQEWQm5vLH3/8Qe3atdFoNJYORwghKjy9Xs/169dp3rw5dnZ2RbZLcgH++OMPhg0bZukwhBCi0tmwYQPe3t5FyiW5ALVr1wYK3qQ6depYOBohhKj4EhMTGTZsmPL3816SXEBpCqtTpw7169e3cDRCCFF5lNSVIB36QgghzE6SixBCCLOrcs1ikZGRnD59mm7dujF+/HhLhyMqmPz8fOLj48nKyrJ0KFVWjRo1qF+/Pmq1fHZ9nFWp5PL777+j0WjYuHEjoaGhpKSk4OrqaumwRAWSkpKCSqWiadOm8sevDOTn53P16lVSUlJwc3OzdDjCgqrUb9fJkyfp1KkTAO3bt+fUqVMWjkhUNOnp6bi7u0tiKSNqtRp3d3du3rxp6VCEhVXY37Do6Gh8fHxo2rQpZ8+eVcovXrxISEgIfn5+hISEcOnSJWVbRkYG9vb2QMGteUZGRpHzZmRkEB8fb/SVmJhY5vURFYNer8fa2trSYVRp1tbW5OXlWToMYWEVtlnM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ZObnj1LFiD6GW5CKEEBVcXnoS2uuVa5ZxSS7CYiw9QWB6Zi7avLvDbm2s1Dg52JXb9YWoyiS5CIspz7UliqPNy0erK/2ZDiHEg5OhyEIIIcxO7lzEY8/VyQ47G9N/Fexq1y51HwcnF7RaHVk3Ux4lNItZtno12Tk5/HPyZEuHIiopSS7isWdnY8Vb8w+iUqmwsdKUun++Tosh36C8VqlVqK1tjPbR5+mIDu1BltmjFaJykGYxS1LL2y9gz5499OnTB39/fxYvXkzTpk05e/as0YqQ8fHxRq8PHjzIkCFDCAwMJCQkhBMnTgCwdetWQkNDlf1279rOjPB3lNfLly8nODiYQYMGMX78eK7/b2r9zMxMQkND6dOnD39//XWzTM4pHm9y51JOdp7ZS1LW3SYS9xqutK5dm+xLlywXlLC4lJQU3nvvPb788ksaN27MihUrSj3m8uXLLFmyhC+++AJ7e3vOnTvHq6++yoEDB+57XExMDFeuXOHrr79GrVazceNGZs+ezccff8zixYupUaMGu3fvJuHcOYa8/DK9unc3Uy3NL+bgBRJS794XerjUwL+7pwUjEveS5FJOkrJSuHLz3k+DRScSFI+X3377jWbNmtG4cWOgYCnjuXPn3veYQ4cOcfnyZYYNG6aU5eXlkZJy//6dffv28ccffzBo0CCgYHGyO3ORHT16VFmcr5aTEz5dujx0ncpDQmoWlxMzLR2GuA9JLkJUQI6OjhgMd/t1bt++bbS9a9eufPTRR0WO02g0RlPm6wrNbmwwGJgwYQLBwcGlXL3ogmRCPChp9Bf3FXPwAsu2nlS+Yg7efzEr8WBat25NXFwcl/7XPHpnCW8HBwd0Oh1//fUXALGxscoxnTt35tChQ5w7d04pO3nyJABPPPEEZ86cQavVotPp+PHAXmUfHx8fNm7cyM2bBeuvaLVafv7tGClZabRq14qNX39Jem4GGVlZ7Dt8uEzrLaq+KnP
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sns.set_theme(style=\"ticks\")\n",
|
||
|
"\n",
|
||
|
"print(df)\n",
|
||
|
"\n",
|
||
|
"g = sns.histplot(df, x=\"Last termination\", weights=\"time_ms\", shrink=.5,\n",
|
||
|
" hue=\"time_type\", multiple=\"dodge\", discrete=True)\n",
|
||
|
"g.set_yscale(\"log\")\n",
|
||
|
"g.set_ylabel(\"Total microseconds\") "
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"id": "temporal-alabama",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Graph 2: Relative total time spent per status per \"last termination\" type\n",
|
||
|
"\n",
|
||
|
"Values are proportions on total for each \"last termination\" type"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"id": "actual-penetration",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"/home/claudio/python-venv/lib/python3.6/site-packages/pandas/core/indexing.py:670: SettingWithCopyWarning: \n",
|
||
|
"A value is trying to be set on a copy of a slice from a DataFrame\n",
|
||
|
"\n",
|
||
|
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
|
||
|
" iloc._setitem_with_indexer(indexer, value)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAENCAYAAAD6/JlzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA4aElEQVR4nO3de1yO9/8H8Ff33cGopCgRQ4wcWjnPCkmHESWRVdZQyCHz23dymuR82pxymDZE5muWiSRmDmOGMZtDhhkjO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50dHRgZmaGhw8fVvjYcgeJ//znP2jWrBnCwsLwxhtvVLgiIqKyMEBUnpd9b8sdJG7evImdO3dCIuHs4kREr4tyf+J369YNSUlJldkWIiKNSE1Ng5OLu/hsFr28cp9JNG3aFEFBQXBxcUHDhg2V9k2ZMkXjDSMiqggvH1/MDPsE3bt1RePGFjj2faJW658+fTosLCwwdepUrdZb2codJPLy8uDk5ITCwkLOk0RE9Jood5BYvHhxZbaDiOilzZ2/EGlp6fgkbCYkUglGfxiIdRu+wKnjR6Crq4uQSVPQo+c7OHv2LK5fv44ePXpg8eLFWLBgAY4dO4aWLVti9erVsLKyAlA82eiCBQtw9epVNGjQAFOmTMGAAQPU1r9r1y7s378fOjo62LZtG3r06IGuXbvil3NnsaTEynufrVoDHejg/z6ajJBJU9CpYwecv/Ar7vx9F10622P2zDDU/3c2iStXrmJ15HrcvnMHjS0aY+qUSejS2b5y30gVyn1N4t69e2p/iIiq0tx
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"for i in [0,4,5,6,7,8]:\n",
|
||
|
" df[\"time_ms\"].loc[df[\"Last termination\"] == to_name(i)] = df[\"time_ms\"].loc[df[\"Last termination\"] == to_name(i)] / totals[i]\n",
|
||
|
"\n",
|
||
|
"h = sns.histplot(df, x=\"Last termination\", weights=\"time_ms\", shrink=.5, common_bins=True,\n",
|
||
|
" hue=\"time_type\", multiple=\"stack\", discrete=True)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "disabled-relative",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "successful-guidance",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"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.6.9"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|