Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,18 @@
"\n",
"```mermaid\n",
"graph LR;\n",
" %% Definiamo i nodi con i loro dettagli\n",
" rqs1[\"<b>RqsGenerator</b><br/>id: rqs-1\"]\n",
" client1[\"<b>Client</b><br/>id: client-1\"]\n",
" app1[\"<b>Server</b><br/>id: app-1<br/>Endpoint: /api\"]\n",
"\n",
" %% Definiamo le connessioni (edge) con latenza\n",
" rqs1 -- \"Edge: gen-client<br/>Latency: 0.0001\" --> client1;\n",
" client1 -- \"Request<br/>Edge: client-app<br/>Latency: 0.0001\" --> app1;\n",
" app1 -- \"Response<br/>Edge: app-client<br/>Latency: 0.0001\" --> client1;"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"tags": [
"build"
Expand Down Expand Up @@ -148,7 +146,7 @@
" e_app_client = Edge(id=\"app-client\", source=\"app-1\", target=\"client-1\", latency=0.0001, dropout_rate=0.0)\n",
"\n",
" settings = SimulationSettings(\n",
" total_simulation_time=900,\n",
" total_simulation_time=2400,\n",
" sample_period_s=0.05,\n",
" )\n",
"\n",
Expand All @@ -160,9 +158,7 @@
" .add_edges(e_gen_client, e_client_app, e_app_client)\n",
" .add_simulation_settings(settings)\n",
" ).build_payload()\n",
" return payload\n",
"\n",
"payload = build_payload()\n"
" return payload\n"
]
},
{
Expand All @@ -174,7 +170,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": null,
"metadata": {
"tags": [
"run"
Expand All @@ -190,6 +186,7 @@
}
],
"source": [
"payload = build_payload()\n",
"env = simpy.Environment()\n",
"runner = SimulationRunner(env=env, simulation_input=payload)\n",
"results: ResultsAnalyzer = runner.run()\n",
Expand Down Expand Up @@ -306,7 +303,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 28,
"metadata": {
"tags": [
"mm1"
Expand All @@ -322,13 +319,13 @@
"--------------------------------------------------------------------\n",
"sym metric theory observed abs rel%\n",
"--------------------------------------------------------------------\n",
"λ Arrival rate (1/s) 33.333333 33.204444 -0.128889 -0.39\n",
"μ Service rate (1/s) 66.666667 66.638004 -0.028663 -0.04\n",
"rho Utilization 0.500000 0.498281 -0.001719 -0.34\n",
"L Mean items in system 1.000000 1.034536 0.034536 3.45\n",
"Lq Mean items in queue 0.500000 0.526294 0.026294 5.26\n",
"W Mean time in system (s) 0.030000 0.031157 0.001157 3.86\n",
"Wq Mean waiting time (s) 0.015000 0.015850 0.000850 5.67\n",
"λ Arrival rate (1/s) 33.333333 33.150833 -0.182500 -0.55\n",
"μ Service rate (1/s) 66.666667 66.556885 -0.109782 -0.16\n",
"rho Utilization 0.500000 0.498083 -0.001917 -0.38\n",
"L Mean items in system 1.000000 1.012994 0.012994 1.30\n",
"Lq Mean items in queue 0.500000 0.504967 0.004967 0.99\n",
"W Mean time in system (s) 0.030000 0.030557 0.000557 1.86\n",
"Wq Mean waiting time (s) 0.015000 0.015232 0.000232 1.55\n",
"====================================================================\n"
]
}
Expand Down
Loading