void OnCongestionEvent(bool rtt_updated, QuicByteCount prior_in_flight, QuicTime event_time,
const AckedPacketVector& acked_packets, const LostPacketVector& lost_packets) override;
void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number,
QuicByteCount bytes, HasRetransmittableData is_retransmittable) override;
As above, we can concluede in OnCongestionEvent, we use prior( before process ack&loss packets). However in OnPacketSent we use just the bytes_flight(already been calc when sending, as in Quic-BBR bbr2_simulation_test.cc file).
But when I see codes in BandwidthSampler::OnPacketSent, I see this "connection_state_map_.Emplace(packet_number, sent_time, bytes,
bytes_in_flight + bytes, *this);
So I get confused, bytes_in_flight in OnPacketSent shouldn't be prior_bytes_inflight, why use (bytes_in_flight + bytes)
Sincerely.
Carlos Li