Created
April 1, 2022 11:50
-
-
Save anandtripathi5/576be7bd888093a6742daebac97b2a48 to your computer and use it in GitHub Desktop.
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
from locust import HttpUser, task | |
from random import randint | |
class AwesomeApplication(HttpUser): | |
@task | |
def hello(self): | |
self.client.get("/hello") | |
@task | |
def world(self): | |
self.client.get("/world") | |
@task | |
def square(self): | |
self.client.get(f"/square/{randint(0,100)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment