Index resources for search.
- Setup development
make setup
- Run tests
make tests
- Run locally
make run
Explore other supported tasks with make help
.
Unit tests mock the pgx connection object. More info: https://github.com/driftprogramming/pgxpoolmock
Prerequisites:
You must have python, pip and locust installed
- Download latest version of python: https://www.python.org/downloads/
- Install pip: https://pip.pypa.io/en/stable/installation/
- Install locust
pip install locust
-
Once we have the search indexer running with steps above, navigate to the test folder and run the following command:
locust -f locust-clusters.py
-
Follow the url provided (http://localhost:8089) and input load parameters in ui prompt. Alternatively, we can just use this one line command instead of the UI for more automatated flow:
locust -f locust-clusters.py --headless --users 10 --spawn-rate 5 -H https://localhost:3010
For more on locust visit https://docs.locust.io/en/stable/index.html
- Build the docker image.
docker build -f Dockerfile.locust .
- Publish the docker image.
- Deploy the following job on your cluster
oc apply -f test/locustJob.yaml
Rebuild Date: 2022-09-26