mirror of
https://github.com/ltcptgeneral/cs239-caching.git
synced 2025-04-01 12:33:25 +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:
parent
3d40e4cc6f
commit
50b5ea0acd
@ -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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user