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
20 changes: 20 additions & 0 deletions .github/actions/run-bash-perf-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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 \
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/perf-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 }}'
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 @@ -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]
4 changes: 2 additions & 2 deletions perf/lib/run-single-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading