Fixig issues in BWE dynamics plot scripts.

BUG=None

Review-Url: https://codereview.webrtc.org/2360053003
Cr-Commit-Position: refs/heads/master@{#14459}
This commit is contained in:
gaetano.carlucci 2016-09-30 06:29:54 -07:00 committed by Commit bot
parent 17b0263366
commit 61050f67ef
9 changed files with 30 additions and 39 deletions

View File

@ -180,7 +180,7 @@ void BitrateControllerImpl::OnReceiverEstimatedBitrate(uint32_t bitrate) {
rtc::CritScope cs(&critsect_);
bandwidth_estimation_.UpdateReceiverEstimate(clock_->TimeInMilliseconds(),
bitrate);
BWE_TEST_LOGGING_PLOT(1, "REMB[kbps]", clock_->TimeInMilliseconds(),
BWE_TEST_LOGGING_PLOT(1, "REMB_kbps", clock_->TimeInMilliseconds(),
bitrate / 1000);
}
MaybeTriggerOnNetworkChanged();
@ -269,11 +269,11 @@ bool BitrateControllerImpl::GetNetworkParameters(uint32_t* bitrate,
new_bitrate = true;
}
BWE_TEST_LOGGING_PLOT(1, "fraction_loss_[%%]", clock_->TimeInMilliseconds(),
BWE_TEST_LOGGING_PLOT(1, "fraction_loss_%", clock_->TimeInMilliseconds(),
(last_fraction_loss_ * 100) / 256);
BWE_TEST_LOGGING_PLOT(1, "rtt[ms]", clock_->TimeInMilliseconds(),
BWE_TEST_LOGGING_PLOT(1, "rtt_ms", clock_->TimeInMilliseconds(),
last_rtt_ms_);
BWE_TEST_LOGGING_PLOT(1, "Target_bitrate[kbps]", clock_->TimeInMilliseconds(),
BWE_TEST_LOGGING_PLOT(1, "Target_bitrate_kbps", clock_->TimeInMilliseconds(),
last_bitrate_bps_ / 1000);
return new_bitrate;

View File

@ -32,13 +32,11 @@ rtc_static_library("remote_bitrate_estimator") {
"test/bwe_test_logging.h",
]
if (!rtc_include_tests) {
if (rtc_enable_bwe_test_logging) {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
sources += [ "test/bwe_test_logging.cc" ]
} else {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
}
if (rtc_enable_bwe_test_logging) {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
sources += [ "test/bwe_test_logging.cc" ]
} else {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
}
if (is_clang) {
@ -88,7 +86,6 @@ if (rtc_include_tests) {
if (rtc_enable_bwe_test_logging) {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
sources += [ "test/bwe_test_logging.cc" ]
} else {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
}

View File

@ -94,8 +94,8 @@ BandwidthUsage OveruseDetector::Detect(double offset,
const double prev_offset = prev_offset_;
prev_offset_ = offset;
const double T = std::min(num_of_deltas, kMinNumDeltas) * offset;
BWE_TEST_LOGGING_PLOT(1, "offset[ms]", now_ms, offset);
BWE_TEST_LOGGING_PLOT(1, "gamma[ms]", now_ms, threshold_ / kMinNumDeltas);
BWE_TEST_LOGGING_PLOT(1, "offset_ms#1", now_ms, offset);
BWE_TEST_LOGGING_PLOT(1, "gamma_ms#1", now_ms, threshold_ / kMinNumDeltas);
if (T > threshold_) {
if (time_over_using_ == -1) {
// Initialize the timer. Assume that we've been

View File

@ -53,7 +53,7 @@ void OveruseEstimator::Update(int64_t t_delta,
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);
BWE_TEST_LOGGING_PLOT(1, "dm_ms", now_ms, t_ts_delta);
double fs_delta = size_delta;
++num_of_deltas_;
@ -74,7 +74,7 @@ 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_);
BWE_TEST_LOGGING_PLOT(1, "d_ms", now_ms, slope_ * h[0] - offset_);
const double residual = t_ts_delta - slope_*h[0] - offset_;
@ -120,7 +120,7 @@ void OveruseEstimator::Update(int64_t t_delta,
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, "slope_1/bps", now_ms, slope_);
BWE_TEST_LOGGING_PLOT(1, "var_noise", now_ms, var_noise_);
}

View File

@ -41,17 +41,13 @@
'test/bwe_test_logging.h',
], # source
'conditions': [
['include_tests==0', {
'conditions': [
['enable_bwe_test_logging==1', {
'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1' ],
'sources': [
'test/bwe_test_logging.cc'
],
}, {
'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0' ],
}],
['enable_bwe_test_logging==1', {
'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1' ],
'sources': [
'test/bwe_test_logging.cc'
],
}, {
'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0' ],
}],
],
},

View File

@ -49,11 +49,11 @@ class Variable(object):
def addSample(self, line):
groups = re.search(r'_(((\d)+((,(\d)+)*))_(\D+))#\d@(\S+)', line)
groups = re.search(r'_(((\d)+((,(\d)+)*))_(\D+))#\d:(\d)@(\S+)', line)
# Each variable will be plotted in a separated box.
var_name = groups.group(1)
alg_name = groups.group(8)
alg_name = groups.group(9)
alg_name = alg_name.replace('_', ' ')
@ -126,8 +126,6 @@ def main():
('Throughput_kbps', "Time (s)", "Throughput (kbps)", 1, 4000),
('Delay_ms', "Time (s)", "One-way Delay (ms)", 2, 500),
('Packet_Loss', "Time (s)", "Packet Loss Ratio", 3, 1.0),
# ('Sending_Estimate_kbps', "Time (s)", "Sending Estimate (kbps)",
# 4, 4000),
]
var = []

View File

@ -28,7 +28,7 @@ log=$(</dev/stdin)
# Plot dynamics.
function gen_gnuplot_input {
colors=(a7001f 0a60c2 b2582b 21a66c d6604d 4393c3 f4a582 92c5de edcbb7 b1c5d0)
plots=$(echo "$log" | grep "^PLOT")
plots=$(echo "$log" | grep "^PLOT" | grep "#")
# Each figure corresponds to a separate plot window.
figures=($(echo "$plots" | cut -f 2 | sort | uniq))

View File

@ -277,11 +277,11 @@ RtcpStatistics StreamStatisticianImpl::CalculateRtcpStatistics() {
receive_counters_.retransmitted.packets;
last_report_old_packets_ = receive_counters_.retransmitted.packets;
last_report_seq_max_ = received_seq_max_;
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "cumulative_loss[pkts]",
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "cumulative_loss_pkts",
clock_->TimeInMilliseconds(),
cumulative_loss_, ssrc_);
BWE_TEST_LOGGING_PLOT_WITH_SSRC(
1, "received_seq_max[pkts]", clock_->TimeInMilliseconds(),
1, "received_seq_max_pkts", clock_->TimeInMilliseconds(),
(received_seq_max_ - received_seq_first_), ssrc_);
return stats;

View File

@ -902,16 +902,16 @@ bool RTPSender::SendToNetwork(std::unique_ptr<RtpPacketToSend> packet,
packet->SetExtension<AbsoluteSendTime>(now_ms);
if (video_) {
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate[kbps]", now_ms,
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoTotBitrate_kbps", now_ms,
ActualSendBitrateKbit(), packet->Ssrc());
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate[Kbps]", now_ms,
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoFecBitrate_kbps", now_ms,
FecOverheadRate() / 1000, packet->Ssrc());
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate[Kbps]", now_ms,
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "VideoNackBitrate_kbps", now_ms,
NackOverheadRate() / 1000, packet->Ssrc());
} else {
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioTotBitrate[kbps]", now_ms,
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioTotBitrate_kbps", now_ms,
ActualSendBitrateKbit(), packet->Ssrc());
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioNackBitrate[Kbps]", now_ms,
BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "AudioNackBitrate_kbps", now_ms,
NackOverheadRate() / 1000, packet->Ssrc());
}