forked from NotAShelf/microfetch
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.93 KB
/
hotpath-profile.yml
File metadata and controls
65 lines (52 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
with:
rustflags: ""
- name: Make Mold the default linker
uses: rui314/setup-mold@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@v4
with:
name: profile-metrics
path: /tmp/metrics/
retention-days: 1