SwissDataScienceCenter / renku-notebooks

An API service to provide jupyter notebooks for the Renku platform.
https://renkulab.io
Apache License 2.0
6 stars 7 forks source link

Setup load testing with Locust #1281

Open olevski opened 2 years ago

olevski commented 2 years ago

https://locust.io/

This can spawn many sessions and see how we handle things.

It would most likely have to be done in a separate cluster... Also I doubt that we could use this on every PR. Or even automated it all.

This can also be applied just to Amalthea.

olevski commented 2 years ago

A very simple scenario would be like this:

import time
from locust import HttpUser, task, between

class QuickstartUser(HttpUser):
    wait_time = between(1, 5)

    @task
    def list_servers(self):
        self.client.get("/ui-server/api/notebooks/servers")

    def on_start(self):
        self.client.get("/ui-server/api/notebooks")

But ideally we could have some acceptance test-like thing where we could simulate a group of 100 users coming in and forking a project + starting sessions all at once