Skip to content
Merged
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
1 change: 0 additions & 1 deletion quest/m0/nightly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Public API: none. Wire: none.
- [The browser backend baseline completes on IETF22](/quest/m0/nightly/browser-baseline.md) - the WASM and UniFFI backend baseline completes every supported transport case without an internal error
- [A Firefox late join reaches live playback](/quest/m0/nightly/firefox-late-join.md) - a Firefox player joining a live broadcast catches up within the media harness's derived playback deadline
- [A stitched restart signals every TS discontinuity](/quest/m0/nightly/stitch-discontinuity.md) - a restarted publisher exported with stitching signals the program break on every affected PID
- [Resolve the paired network microbenchmark regressions](/quest/m0/nightly/paired-net.md) - the reported network microbenchmark regressions are attributed and genuine extra costs are fixed with paired measurements
- [Resolve the paired catalog fanout regressions](/quest/m0/nightly/paired-shared.md) - the reported catalog fanout regressions are attributed and genuine extra costs are fixed with paired measurements
- [Resolve the paired relay-session regressions](/quest/m0/nightly/paired-relay.md) - the reported relay-session regressions are attributed and genuine extra costs are fixed with paired measurements
- [Probing beside Cubic](/quest/m0/nightly/competing-cubic.md) - the `competing_cubic` probe test stays within its deadline budget
Expand Down
22 changes: 0 additions & 22 deletions quest/m0/nightly/paired-net.md

This file was deleted.

9 changes: 9 additions & 0 deletions quest/m1/bench-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ The A/A calibration includes moq-quic's windowed `benches/streams.rs` cases:
on a shared host the unchanged base alone varied 17 to 43% between
back-to-back runs ([moq-dev/moq#6950](https://github.com/moq-dev/moq/pull/6950)).

Confirmed regressions with no extra work behind them, found by
[moq-dev/moq#7139](https://github.com/moq-dev/moq/pull/7139): every round of
`moq-net/group_relay_frames/plain/*` (+23%) and `moq-net/origin/serve_idle/3000r`
(+46%) agreed, yet callgrind counts the same instructions per frame read and per
poll on both builds. A paired round reruns the same two binaries, so a code or
heap layout shift between them reads as a stable regression that rounds cannot
filter. `codec_messages/*/lite` (+31%, +68%) moved only because a new bench group
in the same binary changed what LTO inlines.

## Related

- [Benchmark reporting](/bench/README.md) - the paired comparison and the trend table
50 changes: 29 additions & 21 deletions rs/moq-net/src/model/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,21 @@ impl GroupState {
slots
}

/// Store a whole frame: count its bytes, extend the timeline, and charge its slot plus,
/// unless canonical content already owns the payload, its bytes.
///
/// Returns the coarse tick it stamped, like [`cache::Charge::add`].
fn commit(&mut self, entry: Entry) -> Option<u64> {
let size = entry.frame.payload.len() as u64;
if let Some(flate) = &mut self.flate {
flate.inflated += entry.inflated;
}
self.cache += size;
self.stamp(entry.frame.timestamp);
let slots = self.push(entry);
self.charge.add(slots + if self.content.is_none() { size } else { 0 })
}

/// Whether a compressed group's content failed to inflate.
fn malformed(&self) -> bool {
self.flate.as_ref().is_some_and(|flate| flate.plain.malformed())
Expand Down Expand Up @@ -1435,15 +1450,8 @@ impl Producer {
if let Err(err) = state.canonicalize(state.next_index, &mut entry) {
return Err(self.abort_conflict(state, err));
}
state.cache += size;
if let Some(flate) = &mut state.flate {
flate.inflated += inflated;
}
let slots = state.push(entry);
let charged = slots + if state.content.is_none() { size } else { 0 };
let now = state.charge.add(charged);
let now = state.commit(entry);
state.next_index = next_index;
state.stamp(timestamp);
let bound = state.settle(origin);
self.handle.alive.checked.store(true, Ordering::Relaxed);
self.advance_largest(&state);
Expand Down Expand Up @@ -1529,16 +1537,21 @@ impl Producer {
let mut latest = None;
let mut deflated = deflated.into_iter();
let arrived = super::clock::now();
// Validation is done, so the batch is taken by value: a conflict below fails the group,
// which the buffer need not survive, and moving each payload spares a refcount round trip.
// Only shared canonical content can refuse a frame, so only a group holding it prepares
// the whole batch before storing any; any other stores each frame as it goes.
let canonical = state.content.is_some();
let mut prepared = arrayvec::ArrayVec::<Entry, N>::new();
for (index, frame) in frames.filled().iter().enumerate() {
for (index, frame) in frames.drain().enumerate() {
let timestamp =
on_track(frame.timestamp, self.handle.track.timescale).expect("timestamp scale checked above");
let (payload, inflated) = match state.flate.is_some() {
true => (
deflated.next().expect("one slice per frame"),
frame.payload.len() as u64,
),
false => (frame.payload.clone(), 0),
false => (frame.payload, 0),
};
let mut entry = Entry::plain(
Cached {
Expand All @@ -1548,23 +1561,18 @@ impl Producer {
},
inflated,
);
latest = latest.max(timestamp);
if !canonical {
now = state.commit(entry);
continue;
}
if let Err(err) = state.canonicalize(state.next_index + index, &mut entry) {
return Err(self.abort_conflict(state, err));
}
prepared.push(entry);
}
frames.drain().for_each(drop);
for entry in prepared {
let size = entry.frame.payload.len() as u64;
if let Some(flate) = &mut state.flate {
flate.inflated += entry.inflated;
}
state.cache += size;
state.stamp(entry.frame.timestamp);
latest = latest.max(entry.frame.timestamp);
let slots = state.push(entry);
let charged = slots + if state.content.is_none() { size } else { 0 };
now = state.charge.add(charged);
now = state.commit(entry);
}
state.next_index = next_index;
let bound = state.settle(origin);
Expand Down
6 changes: 3 additions & 3 deletions rs/moq-net/src/path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ impl Path {
/// assert_eq!(Path::empty().parts().count(), 0);
/// ```
pub fn parts(&self) -> impl Iterator<Item = &str> {
// Segments are never empty, but splitting the empty path would yield one.
let s = self.as_str();
(!s.is_empty()).then(|| s.split('/')).into_iter().flatten()
// Segments are never empty, so only the empty path ends in an empty substring,
// which a terminator split skips; the route table walks this on every lookup.
self.as_str().split_terminator('/')
}

/// Whether a segment starts with `.`, which hides the path from announce
Expand Down
Loading