name: hotpath-profile on: pull_request: branches: [ "main" ] env: CARGO_TERM_COLOR: always jobs: profile: runs-on: ubuntu-latest steps: - name: Checkout PR HEAD uses: actions/checkout@v6 with: fetch-depth: 0 - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run timing profiling on HEAD env: HOTPATH_JSON: "true" run: | cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/head_timing.json - name: Run allocation profiling on HEAD env: HOTPATH_JSON: "true" run: | cargo run --features='hotpath,hotpath-alloc' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/head_alloc.json - name: Checkout base branch run: | git checkout ${{ github.event.pull_request.base.sha }} - name: Run timing profiling on base env: HOTPATH_JSON: "true" run: | cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/base_timing.json || echo '{}' > /tmp/base_timing.json - name: Run allocation profiling on base env: HOTPATH_JSON: "true" run: | cargo run --features='hotpath,hotpath-alloc' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/base_alloc.json || echo '{}' > /tmp/base_alloc.json - name: Save PR number run: | echo '${{ github.event.pull_request.number }}' > /tmp/pr_number.txt - name: Upload profiling results uses: actions/upload-artifact@v5 with: name: hotpath-results path: | /tmp/head_timing.json /tmp/head_alloc.json /tmp/base_timing.json /tmp/base_alloc.json /tmp/pr_number.txt retention-days: 1