@@ -17,38 +17,29 @@ jobs:
1717 - uses : dtolnay/rust-toolchain@stable
1818 - uses : Swatinem/rust-cache@v2
1919
20- - id : head_timing_metrics
20+ - name : Create metrics directory
21+ run : mkdir -p /tmp/metrics
22+
23+ - name : Head benchmark (timing)
2124 env :
22- HOTPATH_JSON : true
23- run : |
24- # Extract timing metrics from head branch
25- {
26- echo 'metrics<<EOF'
27- cargo run --features='hotpath' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
28- echo 'EOF'
29- } >> "$GITHUB_OUTPUT"
25+ HOTPATH_OUTPUT_FORMAT : json
26+ HOTPATH_OUTPUT_PATH : /tmp/metrics/head_timing.json
27+ run : cargo run --features='hotpath' --profile hotpath --bin andromeda -- run examples/performance.ts
3028
3129 - name : Checkout base
32- run : |
33- git checkout ${{ github.event.pull_request.base.sha }}
30+ run : git checkout ${{ github.event.pull_request.base.sha }}
3431
35- - id : base_timing_metrics
32+ - name : Base benchmark (timing)
3633 env :
37- HOTPATH_JSON : true
38- run : |
39- # Extract timing metrics from base branch
40- {
41- echo 'metrics<<EOF'
42- cargo run --features='hotpath' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
43- echo 'EOF'
44- } >> "$GITHUB_OUTPUT"
45-
46- - name : Save metrics to artifact
34+ HOTPATH_OUTPUT_FORMAT : json
35+ HOTPATH_OUTPUT_PATH : /tmp/metrics/base_timing.json
36+ run : cargo run --features='hotpath' --profile hotpath --bin andromeda -- run examples/performance.ts
37+
38+ - name : Save PR metadata
4739 run : |
48- mkdir -p /tmp/metrics
49- echo '${{ steps.head_timing_metrics.outputs.metrics }}' > /tmp/metrics/head_timing.json
50- echo '${{ steps.base_timing_metrics.outputs.metrics }}' > /tmp/metrics/base_timing.json
5140 echo '${{ github.event.pull_request.number }}' > /tmp/metrics/pr_number.txt
41+ echo '${{ github.base_ref }}' > /tmp/metrics/base_ref.txt
42+ echo '${{ github.head_ref }}' > /tmp/metrics/head_ref.txt
5243
5344 - uses : actions/upload-artifact@v4
5445 with :
0 commit comments