load-tests #100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: load-tests | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "27 0,12 * * *" # Run at 00:27 and 12:27 UTC every day. | |
| # Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| # Make sure to exit early if cache segment download times out after 2 minutes. | |
| # We limit cache download as a whole to 5 minutes. | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | |
| permissions: read-all | |
| jobs: | |
| setup-environment: | |
| timeout-minutes: 30 | |
| runs-on: oracle-bare-metal-64cpu-512gb-x86-64 | |
| if: ${{ github.actor != 'dependabot[bot]' && github.repository_owner == 'open-telemetry' }} | |
| outputs: | |
| loadtest_matrix: ${{ steps.splitloadtest.outputs.loadtest_matrix }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-go-tools | |
| with: | |
| go-version: oldstable | |
| - run: make genoteltestbedcol | |
| - run: make oteltestbedcol | |
| - name: Upload Testbed Binaries | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: testbed-binaries | |
| path: ./bin/* | |
| - name: Split Loadtest Jobs | |
| id: splitloadtest | |
| run: ./.github/workflows/scripts/setup_e2e_tests.sh | |
| - run: ./.github/workflows/scripts/check-disk-space.sh | |
| loadtest: | |
| runs-on: oracle-bare-metal-64cpu-512gb-x86-64 | |
| needs: [setup-environment] | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.setup-environment.outputs.loadtest_matrix) }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-go-tools | |
| with: | |
| go-version: oldstable | |
| - run: mkdir -p results && touch results/TESTRESULTS.md | |
| - name: Download Testbed Binaries | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8 | |
| with: | |
| name: testbed-binaries | |
| path: bin/ | |
| - run: chmod +x bin/* | |
| # Remove any pre-installed kwokctl so the action installs the pinned version | |
| - name: Remove existing KWOK binaries | |
| run: | | |
| sudo rm -f /usr/local/bin/kwokctl /usr/local/bin/kwok | |
| - name: Install KWOK (kwokctl) | |
| uses: kubernetes-sigs/kwok@c04392afe3cc6929cd3cc79f61d8bdcd83a8ba5d # v0.7.0 | |
| with: | |
| command: kwokctl | |
| - name: Loadtest | |
| run: make -C testbed run-tests | |
| env: | |
| TEST_ARGS: "-test.run=${{ matrix.test }}" | |
| - name: Set results filename | |
| if: ${{ failure() || success() }} | |
| id: filename | |
| run: echo "name=$(echo '${{ matrix.test }}' | sed -e 's/|/_/g')" >> "$GITHUB_OUTPUT" | |
| - name: Create Test Result Archive | |
| if: ${{ failure() || success() }} | |
| continue-on-error: true | |
| run: tar -cvf test_results_${{steps.filename.outputs.name}}.tar testbed/tests/results | |
| - name: Upload Test Results | |
| if: ${{ failure() || success() }} | |
| continue-on-error: true | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: test-result-archive-${{steps.filename.outputs.name}} | |
| path: ./*.tar | |
| - run: cp testbed/tests/results/benchmarks.json testbed/tests/results/${{steps.filename.outputs.name}}.json | |
| - name: Upload benchmarks.json | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: benchmark-results-${{steps.filename.outputs.name}} | |
| path: testbed/tests/results/${{steps.filename.outputs.name}}.json | |
| - run: ./.github/workflows/scripts/check-disk-space.sh | |
| update-benchmarks: | |
| runs-on: ubuntu-24.04 | |
| needs: [loadtest] | |
| permissions: | |
| # deployments permission to deploy GitHub pages website | |
| deployments: write | |
| # contents permission to update benchmark contents in gh-pages branch | |
| contents: write | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8 | |
| with: | |
| pattern: benchmark-results-* | |
| merge-multiple: true | |
| path: results | |
| - run: jq -s 'map(.[])' results/*.json > output.json | |
| - uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1 | |
| with: | |
| tool: "customSmallerIsBetter" | |
| output-file-path: output.json | |
| gh-pages-branch: benchmarks | |
| max-items-in-chart: 100 | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| benchmark-data-dir-path: "docs/benchmarks/loadtests" | |
| auto-push: true |