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

Unified Diff: webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: adding macro declaration Created 4 years, 3 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/remote_bitrate_estimator/overuse_estimator.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc b/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
index 83917912e8824ce34d186d5dab470e1b52e38dd8..5535fe3be3677df71455f70e31e0a3d9b2b695a0 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
@@ -19,6 +19,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
+#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
namespace webrtc {
@@ -48,9 +49,11 @@ OveruseEstimator::~OveruseEstimator() {
void OveruseEstimator::Update(int64_t t_delta,
double ts_delta,
int size_delta,
- BandwidthUsage current_hypothesis) {
+ BandwidthUsage current_hypothesis,
+ int64_t now_ms) {
const double min_frame_period = UpdateMinFramePeriod(ts_delta);
const double t_ts_delta = t_delta - ts_delta;
+ BWE_TEST_LOGGING_PLOT(1, "dm[ms]", now_ms, t_ts_delta);
double fs_delta = size_delta;
++num_of_deltas_;
@@ -71,6 +74,8 @@ void OveruseEstimator::Update(int64_t t_delta,
const double Eh[2] = {E_[0][0]*h[0] + E_[0][1]*h[1],
E_[1][0]*h[0] + E_[1][1]*h[1]};
+ BWE_TEST_LOGGING_PLOT(1, "d[ms]", now_ms, slope_ * h[0] - offset_);
+
const double residual = t_ts_delta - slope_*h[0] - offset_;
const bool in_stable_state = (current_hypothesis == kBwNormal);
@@ -112,6 +117,11 @@ void OveruseEstimator::Update(int64_t t_delta,
slope_ = slope_ + K[0] * residual;
prev_offset_ = offset_;
offset_ = offset_ + K[1] * residual;
+
+ BWE_TEST_LOGGING_PLOT(1, "kc", now_ms, K[0]);
+ BWE_TEST_LOGGING_PLOT(1, "km", now_ms, K[1]);
+ BWE_TEST_LOGGING_PLOT(1, "slope[1/bps]", now_ms, slope_);
+ BWE_TEST_LOGGING_PLOT(1, "var_noise", now_ms, var_noise_);
}
double OveruseEstimator::UpdateMinFramePeriod(double ts_delta) {

Powered by Google App Engine
This is Rietveld 408576698