Repository navigation
feat(bench): the binding benchmark on CodSpeed's CPU simulation #805
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
55f7b42
chore(quest): claim quest/m1/ffi-speed/codspeed.md
kixelated 501b81c
feat(bench): the binding benchmark on CodSpeed's CPU simulation
kixelated 0848e77
Merge remote-tracking branch 'origin/main' into quest/m1/ffi-speed/co…
kixelated 63d7210
fix(bench): Go's reader loop writes with a Timestamp's pointer
kixelated 776c755
feat(bench): CodSpeed counts the languages that pass A/A, a tenth of …
kixelated 11a94ff
fix(bench): cgo keeps its default optimization for the Go program
kixelated 4a71f3c
docs(bench): CodSpeed's CI A/A pair, and its comment only on a change
kixelated 58fab64
fix(ci): give each CodSpeed baseline run its own group, and list the …
kixelated b5b117f
fix(ci): run CodSpeed when the driver changes
kixelated 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,81 @@ | ||
| name: CodSpeed | ||
|
|
||
| # The binding benchmark under CodSpeed's CPU simulation (bench/ffi/README.md): each push to | ||
| # main is its baseline, and a PR that changes what `just ffi bench` reads gets CodSpeed's | ||
| # comment once a case changes. Informational: no threshold fails it, and no ruleset | ||
| # requires it. | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - ffi/** | ||
| # rust2-ffi builds over the driver by path. | ||
| - driver/** | ||
| - bench/ffi/** | ||
| - flake.nix | ||
| - flake.lock | ||
| - .github/workflows/codspeed.yml | ||
| - .github/actions/nix/** | ||
| # What ffi/ takes from ts/: the moq pin ts/justfile reads, and the nightly that | ||
| # ffi/rust-toolchain.toml links to. | ||
| - ts/justfile | ||
| - ts/fixtures/model/Cargo.toml | ||
| - ts/rust-toolchain.toml | ||
| - "!**/*.md" | ||
| pull_request: | ||
| paths: | ||
| - ffi/** | ||
| - driver/** | ||
| - bench/ffi/** | ||
| - flake.nix | ||
| - flake.lock | ||
| - .github/workflows/codspeed.yml | ||
| - .github/actions/nix/** | ||
| - ts/justfile | ||
| - ts/fixtures/model/Cargo.toml | ||
| - ts/rust-toolchain.toml | ||
| - "!**/*.md" | ||
| workflow_dispatch: | ||
|
|
||
| # A PR's newer push supersedes its run. Each of main's runs is a baseline, so each takes its own | ||
| # group: a shared one would still replace a pending run with a newer one. | ||
| concurrency: | ||
| group: codspeed-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| codspeed: | ||
| name: CodSpeed | ||
| # Hosted, which costs a public repository nothing, as does CodSpeed. | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 180 | ||
| permissions: | ||
| contents: read | ||
| # CodSpeed's upload authenticates through GitHub's OIDC token. | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: ./.github/actions/nix | ||
|
|
||
| - name: Build | ||
| run: nix develop .#bench --command just ffi bench-build | ||
|
|
||
| # The bench shell's environment as a script the run sources, so Nix itself never runs | ||
| # under the simulation's Valgrind, which traces every process the run starts. | ||
| - name: Environment | ||
| run: nix print-dev-env .#bench > "$RUNNER_TEMP/bench.sh" | ||
|
|
||
| - name: Run | ||
| uses: CodSpeedHQ/action@af75f77f17a054769abefaa42fe8dc2975469b5f # v5.6.3 | ||
| with: | ||
| mode: simulation | ||
| run: . "$RUNNER_TEMP/bench.sh" && just ffi codspeed | ||
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.