Add locust perf testing
This commit is contained in:
@@ -4,21 +4,23 @@ Provides a REST API to Photowall database.
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure that your system has Python version 3.4 installed. If you dont have it here is how you install it on Ubuntu 12.04:
|
||||
```
|
||||
$ sudo add-apt-repository ppa:fkrull/deadsnakes
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install python3.4 python3.4-dev build-essential libpq-dev
|
||||
```
|
||||
Make sure that your system has Python version 3.6 installed.
|
||||
|
||||
Next its recommended that you create a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/) of python 3.4 and install all packages in it.
|
||||
Next its recommended that you create a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/) of python 3.6 and install all packages in it.
|
||||
To do that execute the following commands in your project folder:
|
||||
```
|
||||
$ virtualenv -p /usr/bin/python3.4 venv
|
||||
$ virtualenv -p /usr/bin/python3.6 venv
|
||||
$ source venv/bin/activate
|
||||
$ pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Local testing with docker
|
||||
Make sure you edit `docker-compose.yml` with correct environment variables.
|
||||
This will launch the production image and listen on port 1881.
|
||||
```
|
||||
$ docker-compose up --force-recreate --build -d
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available [here](docs)
|
||||
@@ -55,3 +57,10 @@ The staging branch is automatically synced from master on new commits to master.
|
||||
To run unit tests:
|
||||
|
||||
`$ python -m unittest`
|
||||
|
||||
## Performance testing with Locust
|
||||
Run locally
|
||||
```
|
||||
$ pip install locust
|
||||
$ USERNAME=user locust --host=http://localhost:1881
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user