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 0612b65..d06d7c8 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" @@ -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: sumanjeet0012/py-libp2p + commit: 88a3df81fcce0f1444d89867d04f13b2b5c3fdd0 + 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] diff --git a/perf/lib/run-single-test.sh b/perf/lib/run-single-test.sh index 5c98af9..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 (300 seconds / 5 minutes) -TEST_TIMEOUT=300 +# Set timeout (7200 seconds / 120 minutes) +TEST_TIMEOUT=7200 # Track test duration TEST_START=$(date +%s)