reflex/integration/loadtesting
2024-09-03 03:12:46 +05:30
..
assets added sandbox app and basic load testing 2024-09-03 03:08:55 +05:30
sandbox added sandbox application and basic loadtests 2024-09-03 03:12:46 +05:30
.gitignore added sandbox application and basic loadtests 2024-09-03 03:12:46 +05:30
locustfile.py added sandbox app and basic load testing 2024-09-03 03:08:55 +05:30
README.md added sandbox app and basic load testing 2024-09-03 03:08:55 +05:30
rxconfig.py added sandbox application and basic loadtests 2024-09-03 03:12:46 +05:30

Load testing for Reflex using Locust

Steps to build locally -

Create virtual env

python3 -m venv env

Activate the virtual env

source env/bin/activate

Install dependencies

pip install -r requirements.txt

Also, install locust and locust plugin

pip install locust
pip install locust-plugins[websocket]

Start the reflex app using poetry

poetry run reflex run

Start locust in a new terminal window

locust

This will start a web app on http://localhost:8089

Configure the number of user and the ramp up. Watch results flow in. When done, terminate the locust process and get aggregate data in the terminal.