https://github.com/sloppycoder/api-load-gen
https://github.com/sloppycoder/api-load-gen
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sloppycoder/api-load-gen
- Owner: sloppycoder
- Created: 2021-06-08T16:10:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T07:45:33.000Z (almost 5 years ago)
- Last Synced: 2025-01-11T08:14:08.964Z (over 1 year ago)
- Language: Python
- Size: 6.98 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Load Generator
[](https://github.com/sloppycoder/api-load-gen/actions/workflows/build.yaml)
Use [Locust.io](http://locust.io) to generate continous calls to microservices for performance testing.
The load generation uses [Boomer](https://github.com/myzhan/boomer) for ability to generate large amount of requests with load CPU oerhead.
### Quick Start
This project requires (Poetry Python package manager)[https://python-poetry.org/].
```
# install all needed dependencies
poetry install
# start up the venv
poetry shell
# start locust with web console enabled
./entry_point.sh
# open browser to http://localhost:8089 to see the results
# to run it in minikube
skaffold dev
```
### To work with prometheus in Minikube
See [this README](misc/minikube/README.md) for instruction to run locust, Prometheus and Grafana in Minkube.
### Test Data
This script reads test data from CSV file at run time. The name of the csv file is /data/data.csv and can be overriden by API_DATA_FILE environment variable. When running inside K8S environment, to use new data for testing, just copy the data file into the persistent volume, e.g. ''' kubectl cp data.csv api-load-gen-7cc7899d78-vkxcs:/data/. ''' and then kill the pod. A new pod will be started which will use new data file for testing.