Created
May 3, 2017 08:48
-
-
Save tylerdiaz/c7be47b825ceb2b93d0fba34cb36d42d to your computer and use it in GitHub Desktop.
Simple way to use 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
# -*- coding: utf-8 -*- | |
from locust import HttpLocust, TaskSet, task | |
import json | |
class UserBehavior(TaskSet): | |
@task(1) | |
def index(self): | |
self.client.get(url="/") | |
class WebsiteUser(HttpLocust): | |
task_set = UserBehavior | |
min_wait = 5000 | |
max_wait = 9000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment