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

Unified Diff: webrtc/test/fake_network_pipe.cc

Issue 2687013005: Increase the send-time history to 60 seconds. (Closed)
Patch Set: Created 3 years, 10 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 | « webrtc/test/fake_network_pipe.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fake_network_pipe.cc
diff --git a/webrtc/test/fake_network_pipe.cc b/webrtc/test/fake_network_pipe.cc
index 88851372cb720978a0b2eb7a6ab1ab068361e3fb..0b3aa6ac71c2b3695789fb19713d32a0c14ecbc0 100644
--- a/webrtc/test/fake_network_pipe.cc
+++ b/webrtc/test/fake_network_pipe.cc
@@ -17,6 +17,7 @@
#include <algorithm>
#include <cmath>
+#include "webrtc/base/logging.h"
#include "webrtc/call/call.h"
#include "webrtc/system_wrappers/include/clock.h"
@@ -37,7 +38,8 @@ FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
sent_packets_(0),
total_packet_delay_(0),
bursting_(false),
- next_process_time_(clock_->TimeInMilliseconds()) {
+ next_process_time_(clock_->TimeInMilliseconds()),
+ last_log_time_(clock_->TimeInMilliseconds()) {
double prob_loss = config.loss_percent / 100.0;
if (config_.avg_burst_loss_length == -1) {
// Uniform loss
@@ -134,6 +136,14 @@ void FakeNetworkPipe::Process() {
std::queue<NetworkPacket*> packets_to_deliver;
{
rtc::CritScope crit(&lock_);
+ if (time_now - last_log_time_ > 5000) {
+ int64_t queueing_delay_ms = 0;
+ if (!capacity_link_.empty()) {
+ queueing_delay_ms = time_now - capacity_link_.front()->send_time();
+ }
+ LOG(LS_INFO) << "Network queue: " << queueing_delay_ms << " ms.";
+ last_log_time_ = time_now;
+ }
// Check the capacity link first.
while (!capacity_link_.empty() &&
time_now >= capacity_link_.front()->arrival_time()) {
« no previous file with comments | « webrtc/test/fake_network_pipe.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698