Created
March 5, 2024 20:49
-
-
Save alexolinux/c67b7094c7f2a123e57c35aef5925cf0 to your computer and use it in GitHub Desktop.
Example Run: locust -f locust.py -H http://localhost -P 8089
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from locust import HttpUser, task, between | |
| class MyUser(HttpUser): | |
| wait_time = between(1, 5) # Time between requests in seconds | |
| @task | |
| def my_task(self): | |
| # Replace api-endpoint | |
| self.client.get("/api-endpoint") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment