Skip to content
Merged
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
10 changes: 5 additions & 5 deletions rs/moq-net/benches/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! holding many announce prefixes does, closes them all at once. Swept over the
//! prefixes followed and the claims each holds: both axes are expected to grow, no
//! faster than the claims held.
//! - refollow: the same node closes one prefix's stream and opens it again. The claims
//! - refollow: the same node stops asking for one prefix and asks for it again. The claims
//! axis is expected to grow, since the stream hears its prefix's claims again; the
//! prefixes axis no faster than the prefixes held.
//!
Expand Down Expand Up @@ -85,8 +85,8 @@ fn bench_received(c: &mut Criterion) {
let mut fixture = None;
group.bench_function(id, |b| {
let relay = fixture.get_or_insert_with(|| fuzz::RouteRelay::heard(claims));
// One serving change per claim changed, and one forwarded batch.
b.iter(|| assert_eq!(relay.change(changes), changes + 1));
// Each claim changed is served into the origin and forwarded on its own.
b.iter(|| assert_eq!(relay.change(changes), 2 * changes));
});
}
group.finish();
Expand Down Expand Up @@ -143,8 +143,8 @@ fn bench_refollow(c: &mut Criterion) {
let mut fixture = None;
group.bench_function(id, |b| {
let follower = fixture.get_or_insert_with(|| fuzz::RouteFollower::new(prefixes, claims));
// The reopened stream serves its prefix's claims into the origin again.
b.iter(|| assert_eq!(follower.refollow(), claims));
// Both edits go to the peer, and the prefix's claims leave the origin and return.
b.iter(|| assert_eq!(follower.refollow(), 2 + 2 * claims));
});
}
group.finish();
Expand Down