Skip to content

Commit 008f6b0

Browse files
magentaqinremimimimimitdejagerhaecker-felixHofer-Julian
authored
perf: setup codspeed to track performance regression (#4519)
Co-authored-by: remimimimimi <[email protected]> Co-authored-by: Tim de Jager <[email protected]> Co-authored-by: Felix Häcker <[email protected]> Co-authored-by: Hofer-Julian <[email protected]> Co-authored-by: Lucas Colley <[email protected]> Co-authored-by: Bas Zalmstra <[email protected]> Co-authored-by: Julian Hofer <[email protected]> Co-authored-by: Valentin Kharin <[email protected]>
1 parent eece036 commit 008f6b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5270
-986
lines changed

.github/actionlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
self-hosted-runner:
22
labels:
3+
- "codspeed-macro"
34
- 8core_ubuntu_latest_runner
45
- 16core_windows_latest_runner
56
- windows_arm64_2025_large

.github/workflows/benchmark.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodSpeed
2+
3+
on:
4+
push:
5+
branches:
6+
- "feature/codespeed" # or "master"
7+
pull_request: # required to have reports on PRs
8+
# `workflow_dispatch` allows CodSpeed to trigger backtest
9+
# performance analysis in order to generate initial data.
10+
workflow_dispatch:
11+
12+
jobs:
13+
benchmarks:
14+
name: Run benchmarks
15+
runs-on: codspeed-macro
16+
env:
17+
RUST_BACKTRACE: full
18+
steps:
19+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
20+
21+
- name: Install system dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y tar bzip2
25+
26+
- name: Setup rust toolchain, cache and cargo-codspeed binary
27+
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e
28+
with:
29+
channel: stable
30+
cache-target: release
31+
bins: cargo-codspeed
32+
33+
- name: Build the benchmark target(s)
34+
run: cargo codspeed build -p pixi_bench
35+
36+
- name: Run the benchmarks
37+
uses: CodSpeedHQ/action@cc824aeb2c86848c39cf722ab4c2b6c5bf290530
38+
with:
39+
run: |
40+
export PATH="~/.cargo/bin:$PATH"
41+
cargo codspeed run -p pixi_bench
42+
mode: walltime
43+
token: ${{ secrets.CODSPEED_TOKEN }}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
with:
108108
save-if: ${{ github.ref == 'refs/heads/main' }}
109109
- run: |
110-
for package in $(cargo metadata --no-deps --format-version=1 | jq -r '.packages[] | .name'); do
110+
for package in $(cargo metadata --no-deps --format-version=1 | jq -r '.packages[] | select(.name != "pixi_bench") | .name'); do
111111
cargo rustdoc -p "$package" --all-features -- -D warnings -W unreachable-pub
112112
done
113113

0 commit comments

Comments
 (0)