microfetch/.github/workflows/hotpath-profile.yml
dependabot[bot] b22148c2c4
chore: bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 11:33:49 +00:00

60 lines
1.8 KiB
YAML

name: hotpath-profile
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
profile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Create metrics directory
run: mkdir -p /tmp/metrics
- name: Head benchmark (timing)
env:
HOTPATH_OUTPUT_FORMAT: json
HOTPATH_OUTPUT_PATH: /tmp/metrics/head_timing.json
run: cargo run -p microfetch --release --features='hotpath'
- name: Head benchmark (alloc)
env:
HOTPATH_OUTPUT_FORMAT: json
HOTPATH_OUTPUT_PATH: /tmp/metrics/head_alloc.json
run: cargo run -p microfetch --release --features='hotpath,hotpath-alloc'
- name: Checkout base
run: git checkout ${{ github.event.pull_request.base.sha }}
- name: Base benchmark (timing)
env:
HOTPATH_OUTPUT_FORMAT: json
HOTPATH_OUTPUT_PATH: /tmp/metrics/base_timing.json
run: cargo run -p microfetch --release --features='hotpath' || echo '{}' > /tmp/metrics/base_timing.json
- name: Base benchmark (alloc)
env:
HOTPATH_OUTPUT_FORMAT: json
HOTPATH_OUTPUT_PATH: /tmp/metrics/base_alloc.json
run: cargo run -p microfetch --release --features='hotpath,hotpath-alloc' || echo '{}' > /tmp/metrics/base_alloc.json
- name: Save PR metadata
run: |
echo '${{ github.event.pull_request.number }}' > /tmp/metrics/pr_number.txt
echo '${{ github.base_ref }}' > /tmp/metrics/base_ref.txt
echo '${{ github.head_ref }}' > /tmp/metrics/head_ref.txt
- uses: actions/upload-artifact@v7
with:
name: profile-metrics
path: /tmp/metrics/
retention-days: 1