1
0
mirror of https://github.com/ltcptgeneral/cs239-caching.git synced 2025-03-30 03:35:18 +00:00

update configs for new database size,

add simulated 10ms delay to database,
updated test script naming to better convey the experiment method
This commit is contained in:
Arthur Lu 2025-03-01 00:35:51 +00:00 committed by root
parent 3d40e4cc6f
commit 50b5ea0acd
7 changed files with 13 additions and 12 deletions

@ -1,4 +1,4 @@
cache_strategy: "Baseline" # Change this to "Prefetch" or "Tiered" or "Seive"
cache_limit: 10
l2_cache_limit: 100
cache_strategy: "Baseline"
cache_limit: 50
l2_cache_limit: 100 # unused
db_file: "llmData_sns.json" # Change this to the name of any json file within the "database/datastore" folder

@ -1,4 +1,4 @@
cache_strategy: "Prefetch" # Change this to "Prefetch" or "Tiered" or "Seive"
cache_limit: 10
l2_cache_limit: 100
cache_strategy: "Prefetch"
cache_limit: 50
l2_cache_limit: 100 # unused
db_file: "llmData_sns.json" # Change this to the name of any json file within the "database/datastore" folder

@ -1,4 +1,4 @@
cache_strategy: "Seive" # Change this to "Prefetch" or "Tiered" or "Seive"
cache_limit: 10
l2_cache_limit: 100
cache_strategy: "Seive"
cache_limit: 50
l2_cache_limit: 100 # unused
db_file: "llmData_sns.json" # Change this to the name of any json file within the "database/datastore" folder

@ -1,4 +1,4 @@
cache_strategy: "Tiered" # Change this to "Prefetch" or "Tiered" or "Seive"
cache_limit: 10
l2_cache_limit: 100
cache_strategy: "Tiered"
cache_limit: 25
l2_cache_limit: 175
db_file: "llmData_sns.json" # Change this to the name of any json file within the "database/datastore" folder

@ -42,6 +42,7 @@ def fetch_user_profile(user_id: str):
return {"user_id": user_id, "profile": cached_profile, "source": "cache", "time_ms": (time.time() - start) * 1000}
profile = get_user_profile(user_id)
time.sleep(10 / 1000) # simulate 10 ms db delay
if profile is None:
raise HTTPException(status_code=404, detail="User not found")