Skip to content

Commit

Permalink
add limit_test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Feralthedogg committed Jan 17, 2025
1 parent 11366e5 commit 911abf2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
venv/
.env
*.pyc
*.pyo
*.pyd
__pycache__/
*.log

.idea/
29 changes: 29 additions & 0 deletions limit_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import requests
import threading

# url = "https://korcen.shibadogs.net/api/v1/korcen"
url = "http://localhost:7777/api/v1/korcen"

data = {
"input": "string",
"replace-end": "string",
"replace-front": "string"
}

def send_request():
try:
response = requests.post(url, json=data)
print(f"Status Code: {response.status_code}, Response: {response.text}")
except Exception as e:
print(f"Error: {e}")

threads = []
for _ in range(200):
thread = threading.Thread(target=send_request)
threads.append(thread)
thread.start()

for thread in threads:
thread.join()

print("completed")
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests

0 comments on commit 911abf2

Please sign in to comment.