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

Unified Diff: webrtc/modules/bitrate_controller/bitrate_controller_impl.cc

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: adding BWE_TEST_LOGGING_COMPILE_TIME_ENABLE to gn files Created 4 years, 4 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
Index: webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
index 1231c782a9b0048f846a708d47d239dcc9557330..bbfc5ae9d1b5de39f3fc7a04b35b753714107327 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
@@ -19,6 +19,8 @@
#include "webrtc/base/logging.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
+
namespace webrtc {
class BitrateControllerImpl::RtcpBandwidthObserverImpl
@@ -178,6 +180,8 @@ void BitrateControllerImpl::OnReceivedEstimatedBitrate(uint32_t bitrate) {
rtc::CritScope cs(&critsect_);
bandwidth_estimation_.UpdateReceiverEstimate(clock_->TimeInMilliseconds(),
bitrate);
+ BWE_TEST_LOGGING_PLOT(1, "REMB[kbps]", clock_->TimeInMilliseconds(), \
+ bitrate/1000);
}
MaybeTriggerOnNetworkChanged();
}
@@ -265,6 +269,14 @@ bool BitrateControllerImpl::GetNetworkParameters(uint32_t* bitrate,
last_reserved_bitrate_bps_ = reserved_bitrate_bps_;
new_bitrate = true;
}
+
+ BWE_TEST_LOGGING_PLOT(1, "fraction_loss_[%%]", \
+ clock_->TimeInMilliseconds(), (last_fraction_loss_*100)/256);
+ BWE_TEST_LOGGING_PLOT(1, "rtt[ms]", clock_->TimeInMilliseconds(), \
+ last_rtt_ms_);
+ BWE_TEST_LOGGING_PLOT(1, "Target_bitrate[kbps]", \
+ clock_->TimeInMilliseconds(), last_bitrate_bps_/1000);
+
return new_bitrate;
}

Powered by Google App Engine
This is Rietveld 408576698