From 73564273a844d7b4a010f158941f29579f83a4fe Mon Sep 17 00:00:00 2001 From: acul71 Date: Sun, 1 Feb 2026 14:51:06 +0100 Subject: [PATCH 1/9] 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 f6304e5e27916c49f35a0f5698da7b7309dbbc4e Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Mon, 2 Mar 2026 09:27:27 +0530 Subject: [PATCH 2/9] update python implementation source to use forked repository --- perf/images.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/images.yaml b/perf/images.yaml index 2d5a8c2..6096e2e 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -102,8 +102,8 @@ implementations: - id: python-v0.x source: type: github - repo: libp2p/py-libp2p - commit: 5eded13c516380ba42aa5432a437ff7b228454cc + repo: sumanjeet0012/py-libp2p + commit: eba02aa2113f4d0ae010a2816b2a101d66388811 dockerfile: interop/perf/Dockerfile transports: [quic-v1, tcp, ws] secureChannels: [noise, tls] From b7b9278a52781743d842de39e58fbb2ce7449377 Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Mon, 2 Mar 2026 13:18:48 +0530 Subject: [PATCH 3/9] increase test timeout from 300 to 600 seconds --- perf/lib/run-single-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/lib/run-single-test.sh b/perf/lib/run-single-test.sh index 0055906..8c56812 100755 --- a/perf/lib/run-single-test.sh +++ b/perf/lib/run-single-test.sh @@ -195,8 +195,8 @@ fi log_debug " Starting containers..." log_message "Running: ${TEST_NAME}" -# Set timeout (300 seconds / 5 minutes) -TEST_TIMEOUT=300 +# Set timeout (600 seconds / 10 minutes) +TEST_TIMEOUT=600 # Track test duration TEST_START=$(date +%s) From 92621fca6cb2356f76b587b0308466a87c854087 Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Mon, 2 Mar 2026 13:20:16 +0530 Subject: [PATCH 4/9] fix: update python-v0.x commit to b688aa83 (bundle QUIC FIN with last data write) --- perf/images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/images.yaml b/perf/images.yaml index 6096e2e..776d39d 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -103,7 +103,7 @@ implementations: source: type: github repo: sumanjeet0012/py-libp2p - commit: eba02aa2113f4d0ae010a2816b2a101d66388811 + commit: b688aa83fc765432ed3986640c581e77a8d15cb2 dockerfile: interop/perf/Dockerfile transports: [quic-v1, tcp, ws] secureChannels: [noise, tls] From ced81dcea779b27b01ec8f938991d367c370c709 Mon Sep 17 00:00:00 2001 From: Sumanjeet Date: Mon, 2 Mar 2026 14:30:54 +0530 Subject: [PATCH 5/9] Increase test timeout from 10 to 20 minutes --- perf/lib/run-single-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/lib/run-single-test.sh b/perf/lib/run-single-test.sh index 8607955..d66ee2a 100755 --- a/perf/lib/run-single-test.sh +++ b/perf/lib/run-single-test.sh @@ -195,8 +195,8 @@ fi log_debug " Starting containers..." log_message "Running: ${TEST_NAME}" -# Set timeout (600 seconds / 10 minutes) -TEST_TIMEOUT=600 +# Set timeout (1200 seconds / 20 minutes) +TEST_TIMEOUT=1200 # Track test duration TEST_START=$(date +%s) From e1ac23163d4643cac640922c94c269d7b5a3162b Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Mon, 2 Mar 2026 18:34:29 +0530 Subject: [PATCH 6/9] perf: update py-libp2p snapshot to b87cf0be (QUIC throughput fixes) --- perf/images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/images.yaml b/perf/images.yaml index 45ce5e3..8c1c654 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -103,7 +103,7 @@ implementations: source: type: github repo: sumanjeet0012/py-libp2p - commit: b688aa83fc765432ed3986640c581e77a8d15cb2 + commit: b87cf0be49369e40cba54b7a2a0bb4db1e7d8c5b dockerfile: interop/perf/Dockerfile transports: [quic-v1, tcp, ws] secureChannels: [noise, tls] From 404fc55257accce1f09bcf28eeaef4c6899d3c2f Mon Sep 17 00:00:00 2001 From: Sumanjeet Date: Fri, 6 Mar 2026 09:25:02 +0530 Subject: [PATCH 7/9] Update run-single-test.sh --- perf/lib/run-single-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/lib/run-single-test.sh b/perf/lib/run-single-test.sh index d66ee2a..b185db8 100755 --- a/perf/lib/run-single-test.sh +++ b/perf/lib/run-single-test.sh @@ -195,8 +195,8 @@ fi log_debug " Starting containers..." log_message "Running: ${TEST_NAME}" -# Set timeout (1200 seconds / 20 minutes) -TEST_TIMEOUT=1200 +# Set timeout (7200 seconds / 120 minutes) +TEST_TIMEOUT=7200 # Track test duration TEST_START=$(date +%s) From ae6f993892e7aa11e26e067c13a3d488473d8a4d Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Fri, 6 Mar 2026 09:54:43 +0530 Subject: [PATCH 8/9] fix: update py-libp2p commit to ff8f8a9 for performance improvements --- perf/images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/images.yaml b/perf/images.yaml index 8c1c654..de29a4d 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -103,7 +103,7 @@ implementations: source: type: github repo: sumanjeet0012/py-libp2p - commit: b87cf0be49369e40cba54b7a2a0bb4db1e7d8c5b + commit: ff8f8a9700245f5c28044a68cf18876730a28818 dockerfile: interop/perf/Dockerfile transports: [quic-v1, tcp, ws] secureChannels: [noise, tls] From 08f027e2019c4c259a99a2f7a97a907ca1c03082 Mon Sep 17 00:00:00 2001 From: sumanjeet0012 Date: Fri, 6 Mar 2026 12:42:16 +0530 Subject: [PATCH 9/9] ci(perf): add transport-select to action + default quic-v1 on auto-PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit action.yml: add transport-select and transport-ignore inputs so callers can scope the test matrix to specific transports. The new flags are wired through to run.sh --transport-select / --transport-ignore. perf-pr.yml: on automatic PR triggers (push to a branch), default transport-select=quic-v1 so only the quic-v1 rows of the test matrix run — reducing CI time from ~1.5 hours to ~15 minutes. The full matrix is still available for manual workflow_dispatch runs (default transport-select=quic-v1 which can be overridden to '' for all). perf/images.yaml: bump python-v0.x commit to 88a3df81 (fixes 1 GB download stall in CI via busy-wait pacing + larger timeouts/buffers). --- .github/actions/run-bash-perf-test/action.yml | 20 ++++++++++++++++++ .github/workflows/perf-pr.yml | 21 +++++++++++++++++++ perf/images.yaml | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-bash-perf-test/action.yml b/.github/actions/run-bash-perf-test/action.yml index 5d86cc3..25ef6ed 100644 --- a/.github/actions/run-bash-perf-test/action.yml +++ b/.github/actions/run-bash-perf-test/action.yml @@ -18,6 +18,14 @@ inputs: description: "Ignore baseline tests (pipe-separated substrings)" required: false default: "" + transport-select: + description: "Select transports to test (pipe-separated patterns, e.g. quic-v1)" + required: false + default: "" + transport-ignore: + description: "Ignore specific transports (pipe-separated patterns)" + required: false + default: "" iterations: description: "Number of iterations per test" required: false @@ -109,6 +117,16 @@ runs: ITERATIONS_FLAG="--iterations ${{ inputs.iterations }}" fi + TRANSPORT_SELECT_FLAG="" + if [ -n "${{ inputs.transport-select }}" ]; then + TRANSPORT_SELECT_FLAG="--transport-select ${{ inputs.transport-select }}" + fi + + TRANSPORT_IGNORE_FLAG="" + if [ -n "${{ inputs.transport-ignore }}" ]; then + TRANSPORT_IGNORE_FLAG="--transport-ignore ${{ inputs.transport-ignore }}" + fi + UPLOAD_BYTES_FLAG="" if [ -n "${{ inputs.upload-bytes }}" ]; then UPLOAD_BYTES_FLAG="--upload-bytes ${{ inputs.upload-bytes }}" @@ -140,6 +158,8 @@ runs: $DOWNLOAD_BYTES_FLAG \ $DURATION_FLAG \ $LATENCY_ITERATIONS_FLAG \ + $TRANSPORT_SELECT_FLAG \ + $TRANSPORT_IGNORE_FLAG \ $SNAPSHOT_FLAG \ $EXPORT_DOCKER_FLAG \ $FORCE_MATRIX_FLAG \ diff --git a/.github/workflows/perf-pr.yml b/.github/workflows/perf-pr.yml index c27b9b7..c729030 100644 --- a/.github/workflows/perf-pr.yml +++ b/.github/workflows/perf-pr.yml @@ -59,6 +59,16 @@ on: required: false default: false type: boolean + transport-select: + description: 'Run only tests matching these transports (pipe-separated, e.g. "quic-v1"). Leave empty for all transports.' + required: false + default: 'quic-v1' + type: string + transport-ignore: + description: 'Ignore tests matching these transports (pipe-separated)' + required: false + default: '' + type: string concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -78,6 +88,8 @@ jobs: debug: ${{ steps.resolve.outputs.debug }} snapshot: ${{ steps.resolve.outputs.snapshot }} export-docker-images: ${{ steps.resolve.outputs.export-docker-images }} + transport-select: ${{ steps.resolve.outputs.transport-select }} + transport-ignore: ${{ steps.resolve.outputs.transport-ignore }} should-run-tests: ${{ steps.resolve.outputs.should-run-tests }} steps: - name: Checkout code @@ -108,6 +120,8 @@ jobs: echo "debug=${{ github.event.inputs.debug }}" >> $GITHUB_OUTPUT echo "snapshot=${{ github.event.inputs.snapshot }}" >> $GITHUB_OUTPUT echo "export-docker-images=${{ github.event.inputs.export-docker-images }}" >> $GITHUB_OUTPUT + echo "transport-select=${{ github.event.inputs.transport-select }}" >> $GITHUB_OUTPUT + echo "transport-ignore=${{ github.event.inputs.transport-ignore }}" >> $GITHUB_OUTPUT echo "should-run-tests=true" >> $GITHUB_OUTPUT echo "→ Manual trigger: using workflow inputs" else @@ -136,6 +150,11 @@ jobs: echo "debug=false" >> $GITHUB_OUTPUT echo "snapshot=true" >> $GITHUB_OUTPUT echo "export-docker-images=false" >> $GITHUB_OUTPUT + # Only run quic-v1 transport tests on automatic PRs to keep CI fast. + # The full transport matrix (tcp, ws, quic-v1) takes ~1.5 hrs; + # scoping to quic-v1 only reduces this to ~15 min. + echo "transport-select=quic-v1" >> $GITHUB_OUTPUT + echo "transport-ignore=" >> $GITHUB_OUTPUT echo "should-run-tests=${{ steps.detect.outputs.has-changes }}" >> $GITHUB_OUTPUT echo "→ Automatic trigger: using change detection outputs" fi @@ -162,3 +181,5 @@ jobs: force-matrix-rebuild: ${{ needs.resolve-parameters.outputs.force-matrix-rebuild }} force-image-rebuild: ${{ needs.resolve-parameters.outputs.force-image-rebuild }} debug: ${{ needs.resolve-parameters.outputs.debug }} + transport-select: '${{ needs.resolve-parameters.outputs.transport-select }}' + transport-ignore: '${{ needs.resolve-parameters.outputs.transport-ignore }}' diff --git a/perf/images.yaml b/perf/images.yaml index de29a4d..d06d7c8 100644 --- a/perf/images.yaml +++ b/perf/images.yaml @@ -103,7 +103,7 @@ implementations: source: type: github repo: sumanjeet0012/py-libp2p - commit: ff8f8a9700245f5c28044a68cf18876730a28818 + commit: 88a3df81fcce0f1444d89867d04f13b2b5c3fdd0 dockerfile: interop/perf/Dockerfile transports: [quic-v1, tcp, ws] secureChannels: [noise, tls]