Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion neqo-http3/benches/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ pub fn bench(c: &mut Criterion, name_prefix: &str) {
group.bench_function(
format!("{name_prefix}/{streams}-streams/each-{data_size}-bytes"),
|b| {
b.iter_batched(
// `_ref`, so dropping the simulator is not timed.
b.iter_batched_ref(
|| setup_fn(streams, data_size),
|sim| black_box(sim.run()),
SmallInput,
Expand Down
3 changes: 2 additions & 1 deletion neqo-transport/benches/transfer_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pub fn bench(c: &mut Criterion, name_prefix: &str) {
for (label, seed) in configs {
for pacing in [false, true] {
group.bench_function(format!("{name_prefix}/pacing-{pacing}/{label}"), |b| {
b.iter_batched(
// `_ref`, so dropping the simulator is not timed.
b.iter_batched_ref(
|| setup(label, seed, pacing),
|sim| black_box(sim.run()),
SmallInput,
Expand Down
2 changes: 1 addition & 1 deletion test-fixture/src/sim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ pub struct ReadySimulator {
}

impl ReadySimulator {
pub fn run(mut self) -> Duration {
pub fn run(&mut self) -> Duration {
#[expect(clippy::disallowed_methods, reason = "Simulations run in real time")]
let real_start = Instant::now();
let end = self.sim.process_loop(self.start, self.now);
Expand Down
Loading