From 26d03d3967e7cb1ee43401eddb57294c5eab6f26 Mon Sep 17 00:00:00 2001 From: cxymds Date: Tue, 10 Nov 2026 16:13:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(performance):=20=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E6=A1=B6=E6=B8=85=E7=90=86=E5=B9=B6=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E9=80=90=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5=E8=AF=81?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../environment-compatibility-tests.yml | 11 + .../workflows/performance-script-tests.yml | 16 +- .github/workflows/rustfs-performance-test.yml | 7 + README.md | 53 ++++ rustfs_performance_test.sh | 13 + rustfs_performance_testing.sh | 122 +++++++- scripts/performance_delete_probe.py | 178 +++++++++++ scripts/performance_s3.py | 292 ++++++++++++++++++ test_performance_s3.py | 291 +++++++++++++++++ test_rustfs_performance_testing.py | 140 ++++++++- 10 files changed, 1104 insertions(+), 19 deletions(-) create mode 100644 scripts/performance_delete_probe.py create mode 100644 scripts/performance_s3.py create mode 100644 test_performance_s3.py diff --git a/.github/workflows/environment-compatibility-tests.yml b/.github/workflows/environment-compatibility-tests.yml index eb31d15a..cc6e2021 100644 --- a/.github/workflows/environment-compatibility-tests.yml +++ b/.github/workflows/environment-compatibility-tests.yml @@ -8,6 +8,10 @@ on: - rustfs-security-test.sh - rustfs-upgrade-test.sh - rustfs_performance_test.sh + - rustfs_performance_testing.sh + - scripts/performance_s3.py + - scripts/performance_delete_probe.py + - test_performance_s3.py - scripts/check_execution_environment.py - scripts/check_shell_syntax.py - scripts/prepare_table_smoke.py @@ -27,6 +31,10 @@ on: - rustfs-security-test.sh - rustfs-upgrade-test.sh - rustfs_performance_test.sh + - rustfs_performance_testing.sh + - scripts/performance_s3.py + - scripts/performance_delete_probe.py + - test_performance_s3.py - scripts/check_execution_environment.py - scripts/check_shell_syntax.py - scripts/prepare_table_smoke.py @@ -55,6 +63,8 @@ jobs: python3 -B scripts/check_shell_syntax.py --report "${RUNNER_TEMP}/shell-syntax.json" test -x rustfs-security-test.sh test -x rustfs-upgrade-test.sh + - name: Install S3 test client + run: python3 -m pip install 'boto3>=1.35,<2' - name: Test portable execution helpers run: >- python3 -B -m unittest -v @@ -62,6 +72,7 @@ jobs: test_check_shell_syntax.py test_rustfs_table.py test_rustfs_performance_testing.py + test_performance_s3.py test_rustfs_replication.py - name: Test missing HOME run: env -u HOME bash test_rustfs_pool_expand.sh diff --git a/.github/workflows/performance-script-tests.yml b/.github/workflows/performance-script-tests.yml index 35cf6cf7..eee518ec 100644 --- a/.github/workflows/performance-script-tests.yml +++ b/.github/workflows/performance-script-tests.yml @@ -4,12 +4,20 @@ on: pull_request: paths: - rustfs_performance_testing.sh + - rustfs_performance_test.sh + - scripts/performance_s3.py + - scripts/performance_delete_probe.py + - test_performance_s3.py - test_rustfs_performance_testing.py - .github/workflows/performance-script-tests.yml push: branches: [main] paths: - rustfs_performance_testing.sh + - rustfs_performance_test.sh + - scripts/performance_s3.py + - scripts/performance_delete_probe.py + - test_performance_s3.py - test_rustfs_performance_testing.py - .github/workflows/performance-script-tests.yml @@ -25,6 +33,10 @@ jobs: with: persist-credentials: false - name: Validate shell syntax - run: bash -n rustfs_performance_testing.sh + run: | + bash -n rustfs_performance_testing.sh + bash -n rustfs_performance_test.sh + - name: Install S3 test client + run: python3 -m pip install 'boto3>=1.35,<2' - name: Test benchmark result contracts without a server - run: python3 test_rustfs_performance_testing.py + run: python3 -B -m unittest -v test_rustfs_performance_testing.py test_performance_s3.py diff --git a/.github/workflows/rustfs-performance-test.yml b/.github/workflows/rustfs-performance-test.yml index 2759386c..8d3eec8d 100644 --- a/.github/workflows/rustfs-performance-test.yml +++ b/.github/workflows/rustfs-performance-test.yml @@ -155,6 +155,8 @@ jobs: uname -a jq --version warp --version || true + python3 -c 'import boto3; from botocore.config import Config' + command -v timeout df -h /data | tail -1 - name: Admit clean shared environment @@ -330,6 +332,11 @@ jobs: ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/get_*.txt ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/put_*.txt ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/mixed_*.txt + ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/*.benchdata* + ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/*.prepare.log + ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/*.cleanup.log + ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/*.s3.json + ${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/*.s3-events.jsonl if-no-files-found: error - name: Reset test environment (after) diff --git a/README.md b/README.md index bae7b174..ab3ae98b 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,59 @@ port that does not conflict with the local package server or another service. All top-level suite entrypoints are directly executable; `bash