This commit is contained in:
Claudio Maggioni 2021-05-22 10:55:53 +02:00
parent 73ae25c788
commit a66756741c

View file

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -18,7 +18,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -27,7 +27,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -44,7 +44,6 @@
" return \"Monitoring\"\n", " return \"Monitoring\"\n",
"\n", "\n",
"def categorical_plot(df, key, title, sorted_xs = None): \n", "def categorical_plot(df, key, title, sorted_xs = None): \n",
" \n",
" if sorted_xs == None:\n", " if sorted_xs == None:\n",
" xs = set()\n", " xs = set()\n",
" lines = []\n", " lines = []\n",
@ -87,7 +86,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -413,6 +412,29 @@
"needs_background": "light" "needs_background": "light"
}, },
"output_type": "display_data" "output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" term priority count\n",
"0 4 0-1 18\n",
"1 4 2-4 38\n",
"2 4 5-8 20\n",
"3 4 9-11 28\n",
"4 5 0-1 0\n",
"5 5 2-4 4\n",
"6 5 5-8 21\n",
"7 5 9-11 78\n",
"8 6 0-1 0\n",
"9 6 2-4 7\n",
"10 6 5-8 25\n",
"11 6 9-11 65\n",
"12 7 0-1 0\n",
"13 7 2-4 4\n",
"14 7 5-8 17\n",
"15 7 9-11 90\n"
]
} }
], ],
"source": [ "source": [
@ -485,6 +507,23 @@
"categorical_plot(dfbtot, \"exectime\", \"2019 data\", xs)\n", "categorical_plot(dfbtot, \"exectime\", \"2019 data\", xs)\n",
"\n", "\n",
"categorical_plot(dfctot, \"n_exec\", \"2019 data\")\n", "categorical_plot(dfctot, \"n_exec\", \"2019 data\")\n",
"\n",
"\n",
"dfa11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n",
" 'priority': [\"0-1\", \"2-4\", \"5-8\", \"9-11\"] * 4,\n",
" 'count': [18, 38, 20, 28, 0, 4, 21, 78, 0, 7, 25, 65, 0, 4, 17, 90]}\n",
"dfa11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n",
"\n",
"dfc11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n",
" 'n_exec': [\"0\", \"1\", \"2-3\", \"4-5\", \"6-7\", \"8-9\", \"10-11\", \"12-13\", \">=14\"] * 4,\n",
" 'count': [45,12,27,18,20,16,20,45,10,17,18,55,7,24,20,52,6,25,16,51,6,25,18,50,5,26,20,49,5,25,]}\n",
"dfc11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n",
"\n",
"dfb11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n",
" 'exectime': [\"<1\", \"1-2\", \"2-4\", \"4-10\", \"10-60\", \"60-1d\", \">=1d\"] * 4,\n",
" 'count': [18, 38, 20, 28, 0, 4, 21, 78, 0, 7, 25, 65, 0, 4, 17, 90]}\n",
"dfb11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n",
"print(dfa11)\n",
"\n" "\n"
] ]
}, },