Skip to content

Commit

Permalink
added some automation
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed May 3, 2021
1 parent 6620e18 commit 06ec8b9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tests/performance/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
FROM locustio/locust
RUN pip install faker python-dotenv
FROM locustio/locust:1.4.4

RUN pip3 --version && \
pip3 install \
faker \
python-dotenv
11 changes: 11 additions & 0 deletions tests/performance/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ requirements: ## compiles pip requirements (.in -> .txt)
@echo "WARNING ##### $< is newer than $@ ####"; diff -uN $@ $<; false;,\
@echo "WARNING ##### $@ does not exist, cloning $< as $@ ############"; cp $< $@)

.PHONY: build
build:
docker buildx build --tag local/locust:latest .

.PHONY: up
up: build
@export TARGET=$(target); \
docker-compose --file docker-compose.yml up

down:
docker-compose --file docker-compose.yml down

.PHONY: install
install-dev: _check_venv_active ## installs dependencies
Expand Down
4 changes: 2 additions & 2 deletions tests/performance/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ services:
- "8089:8089"
volumes:
- ./:/mnt/locust
command: -f /mnt/locust/catalog_services.py --master -H http://master:8089
command: -f /mnt/locust/${TARGET} --master -H http://master:8089

worker:
image: local/locust:latest
volumes:
- ./:/mnt/locust
command: -f /mnt/locust/catalog_services.py --worker --master-host master
command: -f /mnt/locust/${TARGET} --worker --master-host master

0 comments on commit 06ec8b9

Please sign in to comment.