mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-08 14:03:51 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
65 lines
1.9 KiB
YAML
65 lines
1.9 KiB
YAML
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@v4
|
|
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
|