Created
January 21, 2019 13:01
-
-
Save ableuler/10aab6bed83995b7793b4c1a6b922626 to your computer and use it in GitHub Desktop.
Simple locustfile for testing public routes on the Renku gateway.
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 HttpLocust, TaskSet, task | |
class UserBehavior(TaskSet): | |
@task(1) | |
def page_projects(self): | |
self.client.get('/api/projects', | |
headers={'x-requested-with': 'XMLHttpRequest'} | |
) | |
class WebsiteUser(HttpLocust): | |
task_set = UserBehavior | |
min_wait = 1000 | |
max_wait = 1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run this by typing
pipenv run locust --host=https://dev.renku.ch
or similar and browse tohttp://127.0.0.1:8089
. Of course you need to have locust installed for this to work.