-
Notifications
You must be signed in to change notification settings - Fork 158
chore: Use Codspeed runners for wallclock benches #3194
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
larseggert
merged 18 commits into
mozilla:main
from
larseggert:chore-ci-codspeed-runners
Jan 14, 2026
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d62b8b0
chore: Use Codspeed runners for wallclock benches
larseggert 1c0d920
Use codspeed runners for CI benchmarking
larseggert f18311e
Fix matrix determination
larseggert 614f349
`codspeed-macro` -> `Neqo`
larseggert 34c2cc4
Merge labels and groups
larseggert 3355bb5
Again
larseggert a2e563a
Force
larseggert 50b925c
Again
larseggert 2e38f30
Update .github/workflows/codspeed.yml
larseggert 9e78656
Merge branch 'main' into chore-ci-codspeed-runners
larseggert 673aed4
Merge branch 'main' into chore-ci-codspeed-runners
larseggert af125e2
Fixes
larseggert 253765b
Keep intrumentation on GitHub
larseggert 89c01d9
Merge branch 'main' into chore-ci-codspeed-runners
larseggert af1ca3f
Fix machete
larseggert 255c93c
Rename things for consistency with codspeed naming
larseggert 0a196ba
Fix
larseggert 40b5ad1
Do baseline run on push
larseggert 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
| // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
| // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
| // option. This file may not be copied, modified, or distributed | ||
| // except according to those terms. | ||
|
|
||
| use std::time::Duration; | ||
|
|
||
| use criterion::{BenchmarkGroup, Criterion}; | ||
| use test_fixture::{ | ||
| boxed, fixture_init, | ||
| sim::{ | ||
| http3_connection::{Node, Requests, Responses}, | ||
| network::{RandomDelay, TailDrop}, | ||
| ReadySimulator, Simulator, | ||
| }, | ||
| }; | ||
|
|
||
| const ZERO: Duration = Duration::from_millis(0); | ||
| const JITTER: Duration = Duration::from_millis(10); | ||
|
|
||
| /// Benchmark parameters: `(streams, data_size)`. | ||
| const BENCHMARK_PARAMS: [(usize, usize); 3] = [(1, 1_000), (1_000, 1), (1_000, 1_000)]; | ||
|
|
||
| /// Creates a ready simulator for benchmarking HTTP/3 streams. | ||
| pub fn setup(streams: usize, data_size: usize) -> ReadySimulator { | ||
| let nodes = boxed![ | ||
| Node::default_client(boxed![Requests::new(streams, data_size)]), | ||
| TailDrop::dsl_uplink(), | ||
| RandomDelay::new(ZERO..JITTER), | ||
| Node::default_server(boxed![Responses::new(streams, data_size)]), | ||
| TailDrop::dsl_uplink(), | ||
| RandomDelay::new(ZERO..JITTER), | ||
| ]; | ||
| Simulator::new("", nodes).setup() | ||
| } | ||
|
|
||
| /// Runs benchmarks for all parameter combinations. | ||
| /// | ||
| /// The closure receives the benchmark group and parameters, allowing each | ||
| /// benchmark to define its own measurement approach. | ||
| pub fn benchmark<M>(c: &mut Criterion, mut measure: M) | ||
| where | ||
| M: FnMut(&mut BenchmarkGroup<'_, criterion::measurement::WallTime>, usize, usize), | ||
| { | ||
| fixture_init(); | ||
|
|
||
| for (streams, data_size) in BENCHMARK_PARAMS { | ||
| let mut group = c.benchmark_group(format!("{streams}-streams/each-{data_size}-bytes")); | ||
| measure(&mut group, streams, data_size); | ||
| group.finish(); | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.