-
Notifications
You must be signed in to change notification settings - Fork 301
ci: add CodSpeed benchmark reporting #1949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Benoît Cortier (CBenoit)
wants to merge
6
commits into
cbenoit-connector-driven-replay
from
cbenoit-codspeed-benchmark-reporting
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ef96e4d
ci: add CodSpeed benchmark reporting
CBenoit a121d99
fix(ci): restrict CodSpeed walltime runner
CBenoit cf40de8
ci: cache benchmark corpus separately
CBenoit 3a2e180
docs(bench): clarify CodSpeed simulation triggers
CBenoit ca8f866
build: remove redundant CodSpeed package override
CBenoit 50d3e7a
docs(xtask): compress CodSpeed guidance
CBenoit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| name: CodSpeed | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| env: | ||
| CARGO_INCREMENTAL: 0 | ||
| CARGO_NET_RETRY: 10 | ||
| RUSTUP_MAX_RETRIES: 10 | ||
| RUST_BACKTRACE: short | ||
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 | ||
| CARGO_PROFILE_DEV_DEBUG: 0 | ||
|
|
||
| jobs: | ||
| simulation: | ||
| name: CodSpeed simulation | ||
| if: vars.CODSPEED_ENABLED == 'true' | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install build dependencies | ||
| uses: ./.github/actions/install-build-deps | ||
|
|
||
| - name: Rust cache | ||
| uses: Swatinem/rust-cache@v2.9.1 | ||
|
|
||
| - name: Corpus cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ./bench-data/wireshark-rdp | ||
| key: ${{ runner.os }}-codspeed-corpus-${{ hashFiles('crates/ironrdp-bench/corpus.toml') }} | ||
|
|
||
| - name: Fetch corpus | ||
| run: cargo xtask bench corpus-fetch | ||
|
|
||
| - name: Install cargo-codspeed | ||
| run: cargo install cargo-codspeed --version 5.0.1 --locked | ||
|
|
||
| - name: Build benchmarks | ||
| run: cargo codspeed build -p ironrdp-bench --bench bench --bench capture_replay --features codspeed --locked -m simulation | ||
|
|
||
| - name: Measure benchmarks | ||
| uses: CodSpeedHQ/action@v5 | ||
| with: | ||
| mode: simulation | ||
| run: cargo codspeed run -p ironrdp-bench --bench bench --bench capture_replay -m simulation | ||
|
|
||
| walltime: | ||
| name: CodSpeed walltime | ||
| if: github.event_name == 'workflow_dispatch' && vars.CODSPEED_ENABLED == 'true' && vars.CODSPEED_WALLTIME_RUNNER != '' | ||
| runs-on: ${{ vars.CODSPEED_WALLTIME_RUNNER }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install build dependencies | ||
| uses: ./.github/actions/install-build-deps | ||
|
|
||
| - name: Rust cache | ||
| uses: Swatinem/rust-cache@v2.9.1 | ||
|
|
||
| - name: Corpus cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ./bench-data/wireshark-rdp | ||
| key: ${{ runner.os }}-codspeed-corpus-${{ hashFiles('crates/ironrdp-bench/corpus.toml') }} | ||
|
|
||
| - name: Fetch corpus | ||
| run: cargo xtask bench corpus-fetch | ||
|
|
||
| - name: Build replay command | ||
| run: cargo build --release -p ironrdp-bench --bin capture-replay-bench --locked | ||
|
|
||
| - name: Measure replay commands | ||
| uses: CodSpeedHQ/action@v5 | ||
| with: | ||
| mode: walltime | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| benchmarks: | ||
| - name: partial-replay/no-nla-accepted/strict-cli | ||
| exec: ./target/release/capture-replay-bench --capture no-nla-accepted | ||
|
|
||
| - name: partial-replay/no-nla-smartcard/strict-cli | ||
| exec: ./target/release/capture-replay-bench --capture no-nla-smartcard | ||
|
|
||
| - name: connector-replay/no-nla-accepted/strict-cli | ||
| exec: ./target/release/capture-replay-bench --connector no-nla-accepted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.