-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.perf.yml
More file actions
64 lines (60 loc) · 1.73 KB
/
Copy pathdocker-compose.perf.yml
File metadata and controls
64 lines (60 loc) · 1.73 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Perf self-test: libp2p-hs listener + libp2p-hs dialer.
#
# Speaks the unified-testing perf contract: the listener SETs
# `{TEST_KEY}_listener_multiaddr` in Redis and the dialer polls GET
# (the perf contract uses a plain string, unlike the transport
# contract's RPUSH/BLPOP list).
#
# Sizes are kept small so the self-test finishes quickly; the upstream
# perf harness supplies its own (much larger) values.
#
# docker compose -f docker-compose.perf.yml up --build --exit-code-from hs-perf-dialer redis hs-perf-listener hs-perf-dialer
x-test-key: &test-key "cafe0130"
x-perf-env: &perf-env
REDIS_ADDR: "redis:6379"
TEST_KEY: *test-key
TRANSPORT: tcp
SECURE_CHANNEL: noise
MUXER: yamux
LISTENER_IP: "0.0.0.0"
services:
redis:
image: redis:7-alpine
# Disable persistence so a stale listener address never survives across runs.
command: ["redis-server", "--save", "", "--appendonly", "no"]
ports:
- "6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
hs-perf-listener:
build:
context: .
dockerfile: interop/perf/Dockerfile
image: libp2p-hs-perf:latest
depends_on:
redis:
condition: service_healthy
environment:
<<: *perf-env
IS_DIALER: "false"
hs-perf-dialer:
build:
context: .
dockerfile: interop/perf/Dockerfile
image: libp2p-hs-perf:latest
depends_on:
redis:
condition: service_healthy
hs-perf-listener:
condition: service_started
environment:
<<: *perf-env
IS_DIALER: "true"
UPLOAD_BYTES: "10485760"
DOWNLOAD_BYTES: "10485760"
UPLOAD_ITERATIONS: "3"
DOWNLOAD_ITERATIONS: "3"
LATENCY_ITERATIONS: "10"