Spaces Data
Minimal test - lines (123, 138)
path: .spaces[2].spaces[4].metrics.mi.mi_original
old: 97.727095313341
new: 95.56388675282372
path: .spaces[2].spaces[4].metrics.mi.mi_sei
old: 93.22748049533304
new: 93.55559409219887
path: .spaces[2].spaces[4].metrics.mi.mi_visual_studio
old: 57.150348136456735
new: 55.88531389054019
path: .spaces[2].spaces[4].metrics.loc.sloc
old: 14.0
new: 16.0
path: .spaces[2].spaces[4].metrics.loc.blank
old: 1.0
new: 2.0
path: .spaces[2].spaces[4].metrics.loc.cloc
old: 2.0
new: 3.0
Code
def on_packets_lost(self, packets: Iterable[QuicSentPacket], now: float) -> None:
lost_largest_time = 0.0
for packet in packets:
self.bytes_in_flight -= packet.sent_bytes
lost_largest_time = packet.sent_time
# start a new congestion event if packet was sent after the
# start of the previous congestion recovery period.
if lost_largest_time > self._congestion_recovery_start_time:
self._congestion_recovery_start_time = now
self.congestion_window = max(
int(self.congestion_window * K_LOSS_REDUCTION_FACTOR), K_MINIMUM_WINDOW
)
self.ssthresh = self.congestion_window
# TODO : collapse congestion window if persistent congestion