Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSTR-376 : [AI] FastAPI로 마이그레이션 #13

Merged
merged 16 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
✨ Add locust test
add locust test
  • Loading branch information
ekzm8523 committed Nov 16, 2022
commit 2c1635cca88bd469d7de8bbfa1deac0cdc01d97b
29 changes: 29 additions & 0 deletions locustfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from locust import HttpUser, TaskSet, between, task


class UserAction(TaskSet):
@task
def get_integrate_predict(self):
self.client.post(
"/integrate_predict",
json={
"problem_id": 1234,
"user_answer": "얄라얄라얄라숑 얄라리얄라 얄라얄라얄라숑 얄라리얄라 얄라얄라얄라숑 얄라리얄라 얄라얄라얄라숑 얄라리얄라 얄라얄라얄라숑 얄라리얄라 얄라얄라얄라숑 얄라리얄라",
"keyword_standards": [
{"id": 96, "content": "keyword-1"},
{"id": 97, "content": "keyword-2"},
{"id": 98, "content": "keyword-3"},
],
"content_standards": [
{"id": 123, "content": "content 1"},
{"id": 124, "content": "content 2"},
{"id": 125, "content": "content 3"},
],
},
)


class WebsiteUser(HttpUser):
host = "http://csbroker.ddns.net:2222"
tasks = [UserAction]
wait_time = between(1, 4)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ mecab-python3==1.0.5
JPype1==1.4.0
ray==2.0.1
pyrootutils==1.0.4
locust==2.13.0