Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: net/quic/core/congestion_control/cubic_bytes.cc

Issue 2571643002: relnote: Use event_time instead of ApproximateNow() in QUIC cubic code. Protected by --quic_use_eve… (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/core/congestion_control/cubic_bytes.cc
diff --git a/net/quic/core/congestion_control/cubic_bytes.cc b/net/quic/core/congestion_control/cubic_bytes.cc
index 388dd008b2c4365bd0690d31aa6f869281ec5360..89ea5e9eaa1c028c926a437094da59b563701922 100644
--- a/net/quic/core/congestion_control/cubic_bytes.cc
+++ b/net/quic/core/congestion_control/cubic_bytes.cc
@@ -117,9 +117,12 @@ QuicByteCount CubicBytes::CongestionWindowAfterPacketLoss(
QuicByteCount CubicBytes::CongestionWindowAfterAck(
QuicByteCount acked_bytes,
QuicByteCount current_congestion_window,
- QuicTime::Delta delay_min) {
+ QuicTime::Delta delay_min,
+ QuicTime event_time) {
acked_bytes_count_ += acked_bytes;
- QuicTime current_time = clock_->ApproximateNow();
+ QuicTime current_time = FLAGS_quic_use_event_time
+ ? event_time
+ : clock_->ApproximateNow();
// Cubic is "independent" of RTT, the update is limited by the time elapsed.
if (last_congestion_window_ == current_congestion_window &&
« no previous file with comments | « net/quic/core/congestion_control/cubic_bytes.h ('k') | net/quic/core/congestion_control/cubic_bytes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698