mirror of
https://github.com/ltcptgeneral/cs239-caching.git
synced 2026-02-03 06:31:02 +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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user