Skip to content

Commit

Permalink
removed unused results
Browse files Browse the repository at this point in the history
  • Loading branch information
antongiacomo committed Feb 16, 2024
1 parent 315ae57 commit 5400fd5
Show file tree
Hide file tree
Showing 15 changed files with 474 additions and 800 deletions.
8 changes: 8 additions & 0 deletions Experiments/Simulator/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Experiments/Simulator/.idea/Simulator.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Experiments/Simulator/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Experiments/Simulator/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Experiments/Simulator/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

191 changes: 182 additions & 9 deletions Experiments/Simulator/Data Aggegation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,199 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2024-02-16T16:52:56.556745Z",
"start_time": "2024-02-16T16:52:47.090335Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: sqlalchemy in ./venv/lib/python3.11/site-packages (2.0.23)\r\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in ./venv/lib/python3.11/site-packages (from sqlalchemy) (4.8.0)\r\n",
"Requirement already satisfied: greenlet!=0.4.17 in ./venv/lib/python3.11/site-packages (from sqlalchemy) (3.0.1)\r\n",
"Note: you may need to restart the kernel to use updated packages.\n",
"Requirement already satisfied: pymysql in ./venv/lib/python3.11/site-packages (1.1.0)\r\n",
"Note: you may need to restart the kernel to use updated packages.\n",
"Requirement already satisfied: cryptography in ./venv/lib/python3.11/site-packages (41.0.7)\r\n",
"Requirement already satisfied: cffi>=1.12 in ./venv/lib/python3.11/site-packages (from cryptography) (1.16.0)\r\n",
"Requirement already satisfied: pycparser in ./venv/lib/python3.11/site-packages (from cffi>=1.12->cryptography) (2.21)\r\n",
"Note: you may need to restart the kernel to use updated packages.\n",
"Requirement already satisfied: mysql-connector-python in ./venv/lib/python3.11/site-packages (8.2.0)\r\n",
"Requirement already satisfied: protobuf<=4.21.12,>=4.21.1 in ./venv/lib/python3.11/site-packages (from mysql-connector-python) (4.21.12)\r\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"%pip install sqlalchemy\n",
"%pip install pymysql\n",
"%pip install cryptography"
"%pip install cryptography\n",
"%pip install mysql-connector-python\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2 2 1 0.17342368761698404\n",
"2 3 1 0.19530145327250162\n",
"2 5 1 0.4682571093241374\n",
"2 8 1 2.2480960687001548\n",
"2 13 1 20.71980571746826\n",
"\n",
"3 2 1 0.20683892567952475\n",
"3 3 1 0.32927870750427246\n",
"3 5 1 1.0190308888753254\n",
"3 8 1 5.829138358434041\n",
"3 13 1 65.00311867396037\n",
"\n",
"4 2 1 0.33023540178934735\n",
"4 3 1 0.43630528450012207\n",
"4 5 1 1.3492252031962078\n",
"4 8 1 7.258424599965413\n",
"4 13 1 69.21706636746724\n",
"\n",
"5 2 1 0.3928849697113037\n",
"5 3 1 0.6399447917938232\n",
"5 5 1 2.0957400798797607\n",
"5 8 1 12.650308211644491\n",
"5 13 1 172.82362643877664\n",
"\n",
"\n",
"2 2 2 0.29884767532348633\n",
"2 3 2 0.5792909463246664\n",
"2 5 2 2.2495582898457847\n",
"2 8 2 12.62907330195109\n",
"2 13 2 102.09124787648518\n",
"\n",
"3 2 2 0.5885777473449707\n",
"3 3 2 1.205296277999878\n",
"3 5 2 4.958311001459758\n",
"3 8 2 22.865165551503498\n",
"3 13 2 164.63636461893717\n",
"\n",
"4 2 2 1.0929436683654785\n",
"4 3 2 1.8214015165964763\n",
"4 5 2 7.450788577397664\n",
"4 8 2 39.654744942982994\n",
"4 13 2 330.58632667859393\n",
"\n",
"5 2 2 1.3119159539540608\n",
"5 3 2 3.5231497287750244\n",
"5 5 2 10.356765190760294\n",
"5 8 2 46.64448142051697\n",
"5 13 2 721.0900592803955\n",
"\n",
"\n",
"\n",
"3 2 3 0.8777799606323242\n",
"3 3 3 2.7743469874064126\n",
"3 5 3 14.743976751963297\n",
"3 8 3 72.34647711118062\n",
"3 13 3 513.6308225790659\n",
"\n",
"4 2 3 1.8761333624521892\n",
"4 3 3 5.09854261080424\n",
"4 5 3 28.47143530845642\n",
"4 8 3 148.75601013501486\n",
"4 13 3 954.6368896961212\n",
"\n",
"5 2 3 2.942525784174601\n",
"5 3 3 9.298083305358887\n",
"5 5 3 56.912997245788574\n",
"5 8 3 327.9735623200734\n",
"5 13 3 7294.024221976598\n",
"\n",
"\n",
"\n",
"\n",
"4 2 4 2.6105615297953286\n",
"4 3 4 11.17134165763855\n",
"4 5 4 87.87398036321004\n",
"4 8 4 2681.265689690908\n",
"4 13 4 4664.093231360118\n",
"\n",
"5 2 4 5.076303323109944\n",
"5 3 4 24.01309061050415\n",
"5 5 4 181.3952201207479\n",
"5 8 4 1406.8231873512268\n",
"5 13 4 14989.763961315155\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"5 2 5 5.346515655517578\n",
"5 3 5 42.478370666503906\n",
"5 5 5 798.8618222872416\n",
"5 8 5 6578.368642648061\n",
"\n"
]
}
],
"source": [
"import mysql.connector\n",
"mydb = mysql.connector.connect(\n",
" host=\"localhost\",\n",
" user=\"root\",\n",
" password=\"root\",\n",
" port=\"3008\",\n",
" database=\"ACL_Extension\"\n",
")\n",
"mycursor = mydb.cursor()\n",
"for w in range(1,6):\n",
" for n in range(2,6):\n",
" mycursor.execute(f\"\"\"SELECT number_of_nodes, number_of_services, window_size, avg(execution_time) as execution \n",
" FROM ACL_Extension.combinations\n",
" WHERE window_size={w} AND number_of_nodes={n}\n",
" GROUP BY number_of_nodes,number_of_services,window_size\n",
" ORDER BY number_of_nodes\n",
" \"\"\")\n",
" \n",
" for x in mycursor:\n",
" print(*x)\n",
" print() \n",
" print() \n",
" \n",
" \n",
" \n",
" "
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-02-16T17:23:38.279060Z",
"start_time": "2024-02-16T17:23:38.255006Z"
}
},
"execution_count": 21
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
"source": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
Expand Down
2 changes: 1 addition & 1 deletion Experiments/Simulator/experiment_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4
5
4 changes: 2 additions & 2 deletions Experiments/Simulator/windowDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self, nodes: list[Node], data_logger):

self.nodes = nodes
self.running = True
self.best_metric = 0.0
self.best_metric = 1.0
self.best_metrics = []
self.best_composition = []
self.matrixW = CombinationManager(self.nodes).get_weights()
Expand All @@ -28,7 +28,7 @@ def run(self, data):
iteration_metrics.append(iter_result.metric)

avg_metric = sum(iteration_metrics) / len(iteration_metrics)
if avg_metric > self.best_metric:
if avg_metric < self.best_metric:
self.best_composition = copy.deepcopy(self.nodes)
self.best_metrics = copy.deepcopy(iteration_metrics)
self.best_metric = avg_metric
Expand Down
24 changes: 5 additions & 19 deletions Images/graphs/exhaustive_performance.dat
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
1 0.518854856 2.167246103 3.863335848 9.686181068 24.00319695
2 1.155122995 8.13436079 20.87900519 75.47896314 272.1524408
3 2.06437993 16.80896091 63.67619205 326.1566579 1594.151155
4 3.520388126 31.12560415 162.9463832 977.777904 6669.67051
5 5.027447701 52.7076261 326.1525629 2448.575896 27873.31481
6 6.075972319 83.08614302 594.5460689 6358.389269 49076.959109999996
7 8.569904089 132.920095 1031.65961 10668.6213 70280.60341
8 10.33069181 180.8374553 1715.153521 14978.853331000002 91484.24771
9 12.22603893 299.1106832 2785.695437 19289.085362 112687.89201
10 15.30062103 319.085114 3856.2373529999995 23599.317393 133891.53631
11 19.42912316 405.6481893 4926.779269 27909.549424 155095.18061
12 28.73291492 573.2007651 5997.321185 32219.781455000004 176298.82491
13 30.50674295 686.9314141 7067.863101 36530.013486 197502.46920999998
14 29.64511013 739.377336 8138.405016999999 40840.245517 218706.11351
15 33.79735684 938.6307111 9208.946933 45150.477548 239909.75781
16 39.22371697 924.011507 10279.488849 49460.709579 261113.40211
17 43.4720459 1091.300142 11350.030765 53770.94161 282317.04641
18 47.45212817 1293.526862 12420.572681 58081.17364100001 303520.69071000005
19 51.432210440000006 1495.7535819999998 13491.114597 62391.40567200001 324724.33501000004
2 0.29884767532348633 0.8777799606323242 2.6105615297953286 5.346515655517578
3 0.5792909463246664 2.7743469874064126 11.17134165763855 42.478370666503906
5 2.2495582898457847 14.743976751963297 87.87398036321004 798.8618222872416
8 12.62907330195109 72.34647711118062 2681.265689690908 6578.368642648061
13 102.09124787648518 513.6308225790659 4664.093231360118
Loading

0 comments on commit 5400fd5

Please sign in to comment.