Skip to content

Instantly share code, notes, and snippets.

@ableuler
Created January 21, 2019 13:01
Show Gist options
  • Save ableuler/10aab6bed83995b7793b4c1a6b922626 to your computer and use it in GitHub Desktop.
Save ableuler/10aab6bed83995b7793b4c1a6b922626 to your computer and use it in GitHub Desktop.
Simple locustfile for testing public routes on the Renku gateway.
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
@ableuler
Copy link
Author

Run this by typing pipenv run locust --host=https://dev.renku.ch or similar and browse to http://127.0.0.1:8089. Of course you need to have locust installed for this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment