2023-04-10 19:49:43 +02:00
|
|
|
## Requirements
|
|
|
|
run `docker-compose --env-file ./.env up` to init your container
|
|
|
|
## Tests
|
|
|
|
### ETL
|
|
|
|
To see results you only have to run
|
|
|
|
```bash
|
|
|
|
make run_etl
|
|
|
|
```
|
|
|
|
|
|
|
|
### http server
|
|
|
|
To see results you only have to run
|
|
|
|
```bash
|
|
|
|
make run_etl
|
|
|
|
```
|
|
|
|
|
2023-04-05 21:35:06 +02:00
|
|
|
## Benchmark
|
|
|
|
|
2023-04-10 19:49:43 +02:00
|
|
|
### http comparision
|
|
|
|
#### Start your go http server
|
|
|
|
```bash
|
|
|
|
go run cmd/server/main.go
|
|
|
|
```
|
|
|
|
#### Start your nest server
|
|
|
|
```bash
|
|
|
|
cd ~/nest-project-path
|
|
|
|
```
|
|
|
|
```bash
|
|
|
|
npm start
|
|
|
|
```
|
|
|
|
|
|
|
|
Then run benchmark
|
|
|
|
```bash
|
|
|
|
make benchmark_server
|
|
|
|
```
|
|
|
|
|
|
|
|
### other tests
|
|
|
|
To test different tests done on http server response you can do this way:
|
|
|
|
|
|
|
|
First start your http server
|
|
|
|
```bash
|
|
|
|
make run_server
|
|
|
|
```
|
|
|
|
|
|
|
|
Then play running different tests:
|
2023-04-05 21:35:06 +02:00
|
|
|
|
2023-04-10 19:49:43 +02:00
|
|
|
**IMPORTANT** Please do mantain your machine without extra running processes
|
2023-04-10 11:43:13 +02:00
|
|
|
|
2023-04-10 19:49:43 +02:00
|
|
|
```bash
|
|
|
|
make benchmark_go_1000req_15s
|
|
|
|
```
|
|
|
|
then try
|
2023-04-10 11:43:13 +02:00
|
|
|
|
2023-04-10 19:49:43 +02:00
|
|
|
```bash
|
|
|
|
make benchmark_go_1000req
|
|
|
|
```
|
2023-04-10 11:43:13 +02:00
|
|
|
|
2023-04-10 19:49:43 +02:00
|
|
|
Now try nest server, remember to first [startup your nest](#start-your-nest-server)
|
|
|
|
```bash
|
|
|
|
make benchmark_nest_1000req_15s
|
|
|
|
```
|
|
|
|
```bash
|
|
|
|
make benchmark_nest_1000req
|
|
|
|
```
|