forked from 3scale/APIcast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.benchmark.yml
36 lines (35 loc) · 1.04 KB
/
docker-compose.benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '2.2'
services:
apicast:
image: quay.io/3scale/apicast:${IMAGE_TAG:-master}
command: bin/apicast -c /tmp/apicast/echo.json -b
volumes:
- ${CIRCLE_WORKING_DIRECTORY:-.}/examples/configuration/:/tmp/apicast/:ro
environment:
APICAST_WORKERS: 1
cpuset: "0"
cpu_count: 1
wrk:
image: skandyla/wrk
environment:
- WRK_REPORT=/tmp/wrk/${WRK_REPORT:-report.csv}
depends_on:
- apicast
links:
- apicast
volumes:
- ${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