From 73564273a844d7b4a010f158941f29579f83a4fe Mon Sep 17 00:00:00 2001 From: acul71 Date: Sun, 1 Feb 2026 14:51:06 +0100 Subject: [PATCH 1/3] wip: python perf (cherry picked from commit 285b6d3b7d3e4004e19975ae4426a07b27dd7d5f) --- perf/images.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/perf/images.yaml b/perf/images.yaml index a97abbb..2d5a8c2 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -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" @@ -20,7 +22,7 @@ test-aliases: value: "js-v3.x" - alias: "dotnet" value: "dotnet-v1.0" - - alias: "failing" # as of 20 Jan 2026 + - alias: "failing" # as of 29 Jan 2026 value: "go-v0.45|js-v3.x|dotnet-v1.0|rust-v0.56 x rust-v0.56 (webrtc-direct)" # Baseline implementations - Separate from main tests @@ -96,3 +98,22 @@ implementations: secureChannels: [noise, tls] muxers: [yamux] + # Python implementation (github snapshot; Dockerfile uses repo-root context like interop/transport) + - id: python-v0.x + source: + type: github + repo: libp2p/py-libp2p + commit: 5eded13c516380ba42aa5432a437ff7b228454cc + dockerfile: interop/perf/Dockerfile + transports: [quic-v1, tcp, ws] + secureChannels: [noise, tls] + muxers: [yamux, mplex] + # Local python config (same Dockerfile; context = repo root = images/python/v0.x/py-libp2p) + # - id: python-v0.x + # source: + # type: local + # path: images/python/v0.x/py-libp2p + # dockerfile: interop/perf/Dockerfile + # transports: [quic-v1, tcp, ws] + # secureChannels: [noise, tls] + # muxers: [yamux, mplex] From 34f3be71c87c4907b9a067a48c970417a749bf59 Mon Sep 17 00:00:00 2001 From: acul71 Date: Sat, 7 Mar 2026 04:44:16 +0100 Subject: [PATCH 2/3] fix perf python image pin and compose project isolation Pin perf Python tests to the intended py-libp2p snapshot and avoid docker compose project/container name collisions between reruns by using a per-test-pass project suffix. Made-with: Cursor --- perf/images.yaml | 24 ++++++++++++------------ perf/lib/run-single-test.sh | 21 ++++++++++++++------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/perf/images.yaml b/perf/images.yaml index 446b1cc..95f4704 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -100,22 +100,22 @@ implementations: secureChannels: [noise, tls] muxers: [yamux] - # Python implementation (github snapshot; Dockerfile uses repo-root context like interop/transport) - id: python-v0.x source: type: github repo: libp2p/py-libp2p - commit: 5eded13c516380ba42aa5432a437ff7b228454cc + commit: 34c4bd95a0bb170bd37d191c665e10d0f38aad27 dockerfile: interop/perf/Dockerfile - transports: [quic-v1, tcp, ws] + transports: [tcp, ws] secureChannels: [noise, tls] muxers: [yamux, mplex] - # Local python config (same Dockerfile; context = repo root = images/python/v0.x/py-libp2p) - # - id: python-v0.x - # source: - # type: local - # path: images/python/v0.x/py-libp2p - # dockerfile: interop/perf/Dockerfile - # transports: [quic-v1, 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] diff --git a/perf/lib/run-single-test.sh b/perf/lib/run-single-test.sh index 5c98af9..6b61415 100755 --- a/perf/lib/run-single-test.sh +++ b/perf/lib/run-single-test.sh @@ -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})" @@ -114,7 +121,7 @@ fi if [ "${IS_LEGACY_TEST}" == "true" ]; then # Legacy test: external shared network + Redis proxy service cat > "${COMPOSE_FILE}" < "${COMPOSE_FILE}" < Date: Sat, 7 Mar 2026 20:40:19 +0100 Subject: [PATCH 3/3] feat: TLS optimized --- perf/images.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/images.yaml b/perf/images.yaml index 95f4704..20ca379 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -104,7 +104,7 @@ implementations: source: type: github repo: libp2p/py-libp2p - commit: 34c4bd95a0bb170bd37d191c665e10d0f38aad27 + commit: ca470efdaf4df982d4e3844d86a515eb18efca7a dockerfile: interop/perf/Dockerfile transports: [tcp, ws] secureChannels: [noise, tls] @@ -115,7 +115,7 @@ implementations: # type: local # path: images/python/0.x/py-libp2p # dockerfile: interop/perf/Dockerfile - # # transports: [quic-v1, tcp, ws] + # transports: [quic-v1, tcp, ws] # transports: [tcp, ws] # secureChannels: [noise, tls] # muxers: [yamux, mplex]