Created
November 4, 2021 12:27
-
-
Save thiagoferreiraw/71bead938b14033777ff10017fd637c1 to your computer and use it in GitHub Desktop.
Python Locust
This file contains 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
import lorem | |
from locust import HttpUser, task, between | |
class WebsiteUser(HttpUser): | |
wait_time = between(1, 3) | |
@task(5) | |
def index(self): | |
self.client.get("/tasks/") | |
@task(1) | |
def create(self): | |
self.client.post("/tasks/", {"title": lorem.sentence()}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment