Last active
July 16, 2019 08:55
-
-
Save allankp/20efaceefe34a0e80e993b79f3a2d686 to your computer and use it in GitHub Desktop.
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 Locust, task, TaskSet | |
class SimpleSendTask(TaskSet): | |
@task | |
def send_request(self): | |
payload = {"sample_key": "sample_value"} | |
self.client.send("send_endpoint", "POST", payload, "send_endpoint_task_name") | |
class SimpleSendRequest(Locust): | |
def __init__ (self, *args, **kwargs): | |
super(Locust, self).__init__(*args, **kwargs) | |
self.client = BotoClient() | |
task_set = SimpleSendTask | |
min_wait = 5000 | |
max_wait = 15000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment