Skip to content

Commit

Permalink
[make] verify benchmark works with curl
Browse files Browse the repository at this point in the history
  • Loading branch information
mikz committed Nov 7, 2017
1 parent 7437935 commit 36a005b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ benchmark: export WRK_REPORT ?= $(IMAGE_TAG).csv
benchmark: export DURATION ?= 300
benchmark:
- $(DOCKER_COMPOSE) up --force-recreate -d apicast
@sleep 5
$(DOCKER_COMPOSE) run curl
## warmup round for $(DURATION)/10 seconds
DURATION=$$(( $(DURATION) / 10 )) $(DOCKER_COMPOSE) run wrk
## run the real benchmark for $(DURATION) seconds
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ services:
- ${CIRCLE_WORKING_DIRECTORY:-.}/script/wrk-report.lua:/tmp/wrk/report.lua
- ${CIRCLE_WORKING_DIRECTORY:-.}/tmp/benchmark:/tmp/wrk/
command: "--script /tmp/wrk/report.lua --threads ${THREADS:-10} --connections ${CONNECTIONS:-100} --duration ${DURATION:-60} -H 'Host: localhost' http://apicast:8080/echo?user_key=foo"

curl:
image: byrnedo/alpine-curl
links:
- apicast
depends_on:
- apicast
command: |
--retry ${RETRIES:-4}
--retry-connrefused
--fail
-H 'Host: localhost'
http://apicast:8080/echo?user_key=foo

0 comments on commit 36a005b

Please sign in to comment.