Skip to content

Commit

Permalink
Setup gatling (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Ferreira <diegoferreira@PPM-SPO-015219.local>
Co-authored-by: Leo Cavalcante <lc@leocavalcante.com>
  • Loading branch information
3 people committed Aug 19, 2023
1 parent ade1aab commit f60e7d4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ IMAGE_NAME=opencodeco/rinha-de-backend:2023-q3

default: build push

.env:
cp .env.example .env

vendor/autoload.php:
docker compose exec app composer install

.env: vendor/autoload.php
cp .env.example .env

.PHONY: setup
setup:
sh setup.sh

.PHONY: build
build:
docker build -t $(IMAGE_NAME) .
Expand All @@ -22,4 +26,8 @@ up: .env

.PHONY: test
test: vendor/autoload.php
docker compose exec api1 composer test
docker compose exec app1 composer test

.PHONY: stress
stress: vendor/autoload.php
sh ./stress-test/run-test.sh
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ PR da participação: [github.com/zanfranceschi/rinha-de-backend-2023-q3/pull/79

### Primeiros passos

#### Preparar ambiente com o gatling
```shell
make setup
```

#### Subir a aplicação
```shell
make up
Expand All @@ -19,3 +24,8 @@ make up
```shell
make test
```

#### Executar os testes de stress
```shell
make stress
```
7 changes: 7 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sleep 10

mkdir $HOME/gatling/3.9.5
curl -L -o gatling.zip https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/3.9.5/gatling-charts-highcharts-bundle-3.9.5-bundle.zip
mv ./gatling.zip $HOME/gatling/3.9.5/
unzip $HOME/gatling/3.9.5/gatling.zip -d $HOME/gatling/3.9.5/
mv $HOME/gatling/3.9.5/gatling*/* $HOME/gatling/3.9.5

0 comments on commit f60e7d4

Please sign in to comment.