feat(simulation): Added time spent in cache log for each object

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-12-04 16:38:39 +01:00
parent 036789cc7c
commit 7d194176f0
41 changed files with 2170 additions and 13595 deletions

View File

@@ -237,16 +237,16 @@
"[Parallel(n_jobs=-1)]: Using backend LokyBackend with 12 concurrent workers.\n",
"[Parallel(n_jobs=-1)]: Done 26 tasks | elapsed: 0.7s\n",
"[Parallel(n_jobs=-1)]: Done 1420 tasks | elapsed: 1.3s\n",
"[Parallel(n_jobs=-1)]: Done 54501 tasks | elapsed: 1.1min\n",
"[Parallel(n_jobs=-1)]: Done 64152 out of 64152 | elapsed: 2.5min finished\n"
"[Parallel(n_jobs=-1)]: Done 55524 tasks | elapsed: 1.2min\n",
"[Parallel(n_jobs=-1)]: Done 64152 out of 64152 | elapsed: 2.6min finished\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 54.8 s, sys: 1.33 s, total: 56.1 s\n",
"Wall time: 3min 23s\n"
"CPU times: user 53 s, sys: 1.26 s, total: 54.3 s\n",
"Wall time: 3min 24s\n"
]
}
],
@@ -269,6 +269,44 @@
"else:\n",
" results_df = pd.read_csv(objective_result_file)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "e79e6ed1-d6a5-4b04-a2b2-b3f0984e0fbe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Best Result:\n",
"Objective 0.05\n",
"Optimal TTL [inf, inf, inf, inf, inf, inf, inf, inf, inf, ...\n",
"db_object_count 10\n",
"cache_size 10.0\n",
"c_f (Miss Cost) 1.5\n",
"c_delta (Refresh Cost) 0.01\n",
"Name: 2448, dtype: object\n"
]
}
],
"source": [
"# After performing the grid search and obtaining the DataFrame 'results_df'\n",
"best_row = results_df.loc[results_df['Objective'].idxmin()]\n",
"\n",
"# Display the best row\n",
"print(\"Best Result:\")\n",
"print(best_row)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "924fd9c4-6670-4cf4-93a7-b1484111b333",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {

File diff suppressed because one or more lines are too long