38 lines
823 B
Markdown
38 lines
823 B
Markdown
# Elastic / PostgreSQL Benchmark
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
python -m pip install -r requirements.txt
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Every configuration available are available at the top of the `main.py` file to prepare for the run.
|
|
|
|
For example :
|
|
```
|
|
POSTGRES_HOST = "127.0.0.1"
|
|
POSTGRES_PORT = "5432"
|
|
POSTGRES_DB = "postgres"
|
|
POSTGRES_USER = "postgres"
|
|
POSTGRES_PASSWORD = "postgres"
|
|
|
|
ELASTIC_URL = "https://localhost:9200"
|
|
ELASTIC_API_KEY = 'Z18xZzFJOEJXTnUzZ2RiTk5YWkw6ekhiRVpQYnVTZ2FhRjFCR3NVUFB4UQ=='
|
|
RUN_ELASTIC_WITH_N_SHARDS = [1, 2, 4]
|
|
|
|
DOCUMENT_MULTIPLICATOR = 10
|
|
```
|
|
|
|
## Run
|
|
To run the app simply run the `main.py` file while inside the python venv
|
|
|
|
> ⚠️ Make sure that your configuration in the `main.py` file is correct.
|
|
|
|
```
|
|
python -m venv .venv
|
|
python main.py
|
|
```
|