Skip to content

Conversation

@estcarisimo
Copy link

No description provided.

@estcarisimo estcarisimo requested a review from a team as a code owner January 30, 2026 20:03
@LPardue
Copy link
Contributor

LPardue commented Feb 2, 2026

Theres a lot of changes in a single commit. I would recommend splitting out the qlog crate changes to a separate commit and probably it's own PR

/// The maximum send rate observed across all acked packets in this event.
/// Computed as bytes_sent_delta / time_delta between packet send times.
pub sample_max_send_rate: Option<Bandwidth>,
/// The ack rate for the last acked packet in this event.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not also the max for consistency with send_rate?


// New fields for qlog rate metrics
// These reuse the BandwidthSampler's existing computations instead of
// duplicating the calculation in GRecovery
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider removing the previous 3 lines and replace them with some usage comment on these 2 new fields.

  • Application should look at sample_max_bandwidth for bandwidth estimates, not these new fields.
  • The purpose of these fields is to provide additional debug info mostly for qlog.

We could consider only computing these fields if the qlog feature is enabled.

self.min_rtt_filter.update(rtt_sample, event_time);
}

// Store latest rate samples for qlog exposure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment referring to qlog likely to become out of date.

// bandwidth_latest is the max bandwidth for the round, but to allow
// fast, conservation style response to loss, use the last sample.
last_bandwidth = sample_max_bandwidth;
last_bandwidth = congestion_event.sample_max_bandwidth.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what happened here.

The original if let version is more correct. Did you accidentally undo a change in the main branch?

/// Avoid Overestimation in Bandwidth Sampler with ack aggregation.
/// This is an old experiment that we have found to under-perform the
/// algorithm described in the spec. Use is not recommended.
/// Avoid Overestimation in Bandwidth Sampler with ack aggregation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you lost recent changes to comments in this file as you tried to create this PR.

See https://github.com/cloudflare/quiche/pull/2319/changes

/// slightly over estimated. The pacer can only schedule packets
/// 1/8th of an RTT into the future, so the error introduced by
/// setting `time_sent` to `now` is bounded.
time_sent_set_to_now: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have rolled back #2312

@antoniovicente antoniovicente changed the title git commit -m "qlog: add send_rate and ack_rate to MetricsUpdated" qlog: add delivery_rate, send_rate and ack_rate to MetricsUpdated via ex_data Feb 2, 2026
@estcarisimo estcarisimo force-pushed the add-qlog-send-ack-rates branch 2 times, most recently from bffd9d5 to 0e70c88 Compare February 2, 2026 21:02
Copy link
Contributor

@antoniovicente antoniovicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise.

ex_data
.insert("delivery_rate".to_string(), serde_json::json!(rate));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also suppress events when the latest measurement is None? Something like:

        // Build ex_data for rate metrics
        let mut ex_data = qlog::events::ExData::new();
        if self.delivery_rate != latest.delivery_rate {
-           self.delivery_rate = latest.delivery_rate;
-           emit_event = true;
-           if let Some(rate) = latest.delivery_rate {
+           if let Some(rate) = latest.delivery_rate {
+              self.delivery_rate = latest.delivery_rate;
+              emit_event = true;
                ex_data
                    .insert("delivery_rate".to_string(), serde_json::json!(rate));
            }
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants