Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion perf/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ test-aliases:
- alias: "none"
value: "!~all"
- alias: "images"
value: "dotnet-v1.0|go-v0.45|js-v3.x|rust-v0.56"
value: "dotnet-v1.0|go-v0.45|js-v3.x|python-v0.x|rust-v0.56"
- alias: "python"
value: "python-v0.x"
- alias: "baselines"
value: "https|quic-go|iperf"
- alias: "go"
Expand Down Expand Up @@ -98,3 +100,22 @@ implementations:
secureChannels: [noise, tls]
muxers: [yamux]

- id: python-v0.x
source:
type: github
repo: libp2p/py-libp2p
commit: ca470efdaf4df982d4e3844d86a515eb18efca7a
dockerfile: interop/perf/Dockerfile
transports: [tcp, ws]
secureChannels: [noise, tls]
muxers: [yamux, mplex]
# Local python config (same Dockerfile; context = repo root = images/python/0.x/py-libp2p)
#- id: python-v0.x
# source:
# type: local
# path: images/python/0.x/py-libp2p
# dockerfile: interop/perf/Dockerfile
# transports: [quic-v1, tcp, ws]
# transports: [tcp, ws]
# secureChannels: [noise, tls]
# muxers: [yamux, mplex]
21 changes: 14 additions & 7 deletions perf/lib/run-single-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@ TEST_SLUG=$(echo "${TEST_NAME}" | sed 's/[^a-zA-Z0-9-]/_/g')
LOG_FILE="${TEST_PASS_DIR}/logs/${TEST_SLUG}.log"
> "${LOG_FILE}"

# Use unique compose project/container names per test pass to avoid stale
# docker compose state collisions when rerunning the same test selection.
RUN_KEY=$(compute_test_key "${TEST_PASS_NAME}-${TEST_NAME}")
COMPOSE_PROJECT_NAME="${TEST_SLUG}_${RUN_KEY}"
CONTAINER_PREFIX="${COMPOSE_PROJECT_NAME}"

print_debug "test key: ${TEST_KEY}"
print_debug "test slug: ${TEST_SLUG}"
print_debug "log file: ${LOG_FILE}"
print_debug "compose project: ${COMPOSE_PROJECT_NAME}"

log_message "[$((${TEST_INDEX} + 1))] ${TEST_NAME} (key: ${TEST_KEY})"

Expand Down Expand Up @@ -114,7 +121,7 @@ fi
if [ "${IS_LEGACY_TEST}" == "true" ]; then
# Legacy test: external shared network + Redis proxy service
cat > "${COMPOSE_FILE}" <<EOF
name: ${TEST_SLUG}
name: ${COMPOSE_PROJECT_NAME}

networks:
default:
Expand All @@ -127,7 +134,7 @@ networks:
services:
proxy-${TEST_KEY}:
image: libp2p-redis-proxy
container_name: ${TEST_SLUG}_proxy
container_name: ${CONTAINER_PREFIX}_proxy
networks:
- perf-network
environment:
Expand All @@ -136,7 +143,7 @@ services:

listener:
image: ${LISTENER_IMAGE}
container_name: ${TEST_SLUG}_listener
container_name: ${CONTAINER_PREFIX}_listener
init: true
depends_on:
- proxy-${TEST_KEY}
Expand All @@ -147,7 +154,7 @@ ${LISTENER_ENV}

dialer:
image: ${DIALER_IMAGE}
container_name: ${TEST_SLUG}_dialer
container_name: ${CONTAINER_PREFIX}_dialer
depends_on:
- listener
- proxy-${TEST_KEY}
Expand All @@ -159,7 +166,7 @@ EOF
else
# Modern test: external shared network, no proxy needed
cat > "${COMPOSE_FILE}" <<EOF
name: ${TEST_SLUG}
name: ${COMPOSE_PROJECT_NAME}

networks:
default:
Expand All @@ -172,7 +179,7 @@ networks:
services:
listener:
image: ${LISTENER_IMAGE}
container_name: ${TEST_SLUG}_listener
container_name: ${CONTAINER_PREFIX}_listener
init: true
networks:
- perf-network
Expand All @@ -181,7 +188,7 @@ ${LISTENER_ENV}

dialer:
image: ${DIALER_IMAGE}
container_name: ${TEST_SLUG}_dialer
container_name: ${CONTAINER_PREFIX}_dialer
depends_on:
- listener
networks:
Expand Down
Loading