diff --git a/app/config_baseline.yaml b/app/config_baseline.yaml index c8eb188..145755d 100644 --- a/app/config_baseline.yaml +++ b/app/config_baseline.yaml @@ -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 \ No newline at end of file diff --git a/app/config_prefetch.yaml b/app/config_prefetch.yaml index 162518f..2e098d5 100644 --- a/app/config_prefetch.yaml +++ b/app/config_prefetch.yaml @@ -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 \ No newline at end of file diff --git a/app/config_seive.yaml b/app/config_seive.yaml index 884cba0..bc86953 100644 --- a/app/config_seive.yaml +++ b/app/config_seive.yaml @@ -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 \ No newline at end of file diff --git a/app/config_tiered.yaml b/app/config_tiered.yaml index 99494e9..ef08530 100644 --- a/app/config_tiered.yaml +++ b/app/config_tiered.yaml @@ -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 \ No newline at end of file diff --git a/app/main.py b/app/main.py index 8fef2e2..5b80676 100644 --- a/app/main.py +++ b/app/main.py @@ -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") diff --git a/tests/random_friend_readonly.py b/tests/weighred_freind_readonly.py similarity index 100% rename from tests/random_friend_readonly.py rename to tests/weighred_freind_readonly.py diff --git a/tests/random_readwrite.py b/tests/weighted_frequentuser_readwrite.py similarity index 100% rename from tests/random_readwrite.py rename to tests/weighted_frequentuser_readwrite.py