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

Unified Diff: net/quic/congestion_control/send_algorithm_simulator.h

Issue 399773003: QUIC test only change to add a convenience operator for printing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/send_algorithm_simulator.h
diff --git a/net/quic/congestion_control/send_algorithm_simulator.h b/net/quic/congestion_control/send_algorithm_simulator.h
index 4941f35665dd03a4e688a1f309b7f6d5dc4cf45d..f94aee735bdef7930605cc0abad6249bceb2e599 100644
--- a/net/quic/congestion_control/send_algorithm_simulator.h
+++ b/net/quic/congestion_control/send_algorithm_simulator.h
@@ -8,15 +8,20 @@
#define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_
#include <algorithm>
+#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "base/format_macros.h"
+#include "base/strings/stringprintf.h"
#include "net/quic/congestion_control/send_algorithm_interface.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_time.h"
#include "net/quic/test_tools/mock_clock.h"
#include "net/quic/test_tools/quic_test_utils.h"
+using base::StringPrintf;
+
namespace net {
class SendAlgorithmSimulator {
@@ -34,6 +39,15 @@ class SendAlgorithmSimulator {
last_cwnd = cwnd;
}
+ std::string DebugString() {
+ return StringPrintf("observed goodput(bytes/s):%" PRId64 " cwnd:%" PRIu64
+ " max_cwnd:%" PRIu64 " min_cwnd:%" PRIu64
+ " max_cwnd_drop:%" PRIu64,
+ last_transfer_bandwidth.ToBytesPerSecond(),
+ send_algorithm->GetCongestionWindow(),
+ max_cwnd, min_cwnd, max_cwnd_drop);
+ }
Ryan Hamilton 2014/07/17 00:02:46 I suspect you'll need to move this to the .cc file
ramant (doing other things) 2014/07/18 18:02:25 I am surprised, not sure why compiler's didn't com
+
SendAlgorithmInterface* send_algorithm;
RttStats* rtt_stats;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698