From b0b992dbb98ac9aa53a182bfd72b071d94d1aa32 Mon Sep 17 00:00:00 2001 From: William Correa Date: Fri, 18 Aug 2023 23:10:27 -0300 Subject: [PATCH] fix: Corrigir merge com a master --- Makefile | 16 ++++++++++++---- README.md | 10 ++++++++++ setup.sh | 7 +++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 setup.sh diff --git a/Makefile b/Makefile index bb232e78..4dcce352 100644 --- a/Makefile +++ b/Makefile @@ -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) . @@ -22,4 +26,8 @@ up: .env .PHONY: test test: vendor/autoload.php - docker compose exec app composer test + docker compose exec app1 composer test + +.PHONY: stress +stress: vendor/autoload.php + sh ./stress-test/run-test.sh diff --git a/README.md b/README.md index b7f7e4e9..b9629298 100644 --- a/README.md +++ b/README.md @@ -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 @@ -19,3 +24,8 @@ make up ```shell make test ``` + +#### Executar os testes de stress +```shell +make stress +``` diff --git a/setup.sh b/setup.sh new file mode 100644 index 00000000..9be4437c --- /dev/null +++ b/setup.sh @@ -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 \ No newline at end of file