Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true

This patch enables bwe related variable logging to the command line.
This is useful to test congestion control algorithm over real networks.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2296253002
Cr-Commit-Position: refs/heads/master@{#14209}
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
index e94baa7..bc2f1f6 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
@@ -17,6 +17,7 @@
 
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
+#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 
 namespace webrtc {
@@ -179,6 +180,8 @@
     rtc::CritScope cs(&critsect_);
     bandwidth_estimation_.UpdateReceiverEstimate(clock_->TimeInMilliseconds(),
                                                  bitrate);
+    BWE_TEST_LOGGING_PLOT(1, "REMB[kbps]", clock_->TimeInMilliseconds(),
+                          bitrate / 1000);
   }
   MaybeTriggerOnNetworkChanged();
 }
@@ -269,6 +272,14 @@
     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;
 }