Skip to content

Instantly share code, notes, and snippets.

@allankp
Last active July 16, 2019 08:55
Show Gist options
  • Save allankp/20efaceefe34a0e80e993b79f3a2d686 to your computer and use it in GitHub Desktop.
Save allankp/20efaceefe34a0e80e993b79f3a2d686 to your computer and use it in GitHub Desktop.
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