Skip to content

Instantly share code, notes, and snippets.

@tylerdiaz
Created May 3, 2017 08:48
Show Gist options
  • Save tylerdiaz/c7be47b825ceb2b93d0fba34cb36d42d to your computer and use it in GitHub Desktop.
Save tylerdiaz/c7be47b825ceb2b93d0fba34cb36d42d to your computer and use it in GitHub Desktop.
Simple way to use locust
# -*- 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