(ci/cd) run load test

This commit is contained in:
ishaan-jaff 2024-03-15 15:25:33 -07:00
parent a98c5fdbeb
commit 06e319fceb
2 changed files with 4 additions and 6 deletions

View file

@ -23,7 +23,7 @@ jobs:
with: with:
LOCUSTFILE: ".github/workflows/locustfile.py" LOCUSTFILE: ".github/workflows/locustfile.py"
URL: "https://litellm-database-docker-build-production.up.railway.app/" URL: "https://litellm-database-docker-build-production.up.railway.app/"
USERS: "2000" USERS: "200"
RATE: "20" RATE: "20"
RUNTIME: "300s" RUNTIME: "300s"
- name: Process Load Test Stats - name: Process Load Test Stats

View file

@ -4,9 +4,7 @@ import time
class MyUser(HttpUser): class MyUser(HttpUser):
wait_time = between(1, 5) @task(20)
@task(2)
def chat_completion(self): def chat_completion(self):
headers = { headers = {
"Content-Type": "application/json", "Content-Type": "application/json",
@ -29,13 +27,13 @@ class MyUser(HttpUser):
# Print or log the response if needed # Print or log the response if needed
@task(10) @task(40)
def health_readiness(self): def health_readiness(self):
start_time = time.time() start_time = time.time()
response = self.client.get("health/readiness") response = self.client.get("health/readiness")
response_time = time.time() - start_time response_time = time.time() - start_time
@task(10) @task(40)
def health_liveliness(self): def health_liveliness(self):
start_time = time.time() start_time = time.time()
response = self.client.get("health/liveliness") response = self.client.get("health/liveliness")