|
| 1 | +# TEMPORARY diagnostic workflow to reproduce and profile the slow |
| 2 | +# consistent-sampling tests on Windows / Java 26. Remove before merging upstream. |
| 3 | +# |
| 4 | +# Triggers only via workflow_dispatch. Runs ONLY the two slow legacy tests with |
| 5 | +# JFR profiling enabled (-PdiagProfiling) across a small matrix to triangulate |
| 6 | +# whether the slowdown is Windows-specific, Java-26-specific, or the combination. |
| 7 | +name: Diag - Consistent Sampling Slow |
| 8 | + |
| 9 | +on: |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + diag: |
| 17 | + name: ${{ matrix.os }} ${{ matrix.distribution }}-${{ matrix.test-java-version }} |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + timeout-minutes: 120 |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + # CI's exact failing config (build-common uses zulu) |
| 25 | + - os: windows-latest |
| 26 | + distribution: zulu |
| 27 | + test-java-version: 26 |
| 28 | + # vendor hypothesis: temurin 26 runs fast locally on Windows |
| 29 | + - os: windows-latest |
| 30 | + distribution: temurin |
| 31 | + test-java-version: 26 |
| 32 | + # version baseline: zulu 25 runs fast |
| 33 | + - os: windows-latest |
| 34 | + distribution: zulu |
| 35 | + test-java-version: 25 |
| 36 | + # OS dimension: zulu 26 on linux |
| 37 | + - os: ubuntu-latest |
| 38 | + distribution: zulu |
| 39 | + test-java-version: 26 |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 42 | + with: |
| 43 | + persist-credentials: false |
| 44 | + |
| 45 | + - id: setup-java-test |
| 46 | + name: Set up Java ${{ matrix.test-java-version }} for tests |
| 47 | + uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 |
| 48 | + with: |
| 49 | + distribution: ${{ matrix.distribution }} |
| 50 | + java-version: ${{ matrix.test-java-version }} |
| 51 | + |
| 52 | + - id: setup-java |
| 53 | + name: Set up Java for build |
| 54 | + uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 |
| 55 | + with: |
| 56 | + distribution: temurin |
| 57 | + java-version: 21 |
| 58 | + |
| 59 | + - name: Set up Gradle |
| 60 | + uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 |
| 61 | + |
| 62 | + - name: Run slow consistent-sampling tests with profiling |
| 63 | + run: > |
| 64 | + ./gradlew :consistent-sampling:test -PdiagProfiling |
| 65 | + "-PtestJavaVersion=${{ matrix.test-java-version }}" |
| 66 | + "-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }}" |
| 67 | + "-Porg.gradle.java.installations.auto-download=false" |
| 68 | + --tests "*.consistent.ConsistentProbabilityBasedSamplerTest" |
| 69 | + --tests "*.consistent.ConsistentRateLimitingSamplerTest" |
| 70 | + env: |
| 71 | + GITHUB_TOKEN: ${{ github.token }} |
| 72 | + |
| 73 | + - name: Upload diagnostics |
| 74 | + if: ${{ !cancelled() }} |
| 75 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 76 | + with: |
| 77 | + name: diag-${{ matrix.os }}-${{ matrix.distribution }}${{ matrix.test-java-version }} |
| 78 | + path: | |
| 79 | + consistent-sampling/build/diag/** |
| 80 | + consistent-sampling/build/reports/tests/** |
| 81 | + consistent-sampling/build/test-results/** |
| 82 | + if-no-files-found: warn |
0 commit comments