Normalize baseline in network delay plot to RTT/2.
Bug: None Change-Id: I0d4266216adf9283ceb335281f9332f66a04324e Reviewed-on: https://webrtc-review.googlesource.com/c/107648 Commit-Queue: Björn Terelius <terelius@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25369}
This commit is contained in:
committed by
Commit Bot
parent
039743e066
commit
57ba7e1276
@ -1296,9 +1296,10 @@ void EventLogAnalyzer::CreateReceiveSideBweSimulationGraph(Plot* plot) {
|
||||
void EventLogAnalyzer::CreateNetworkDelayFeedbackGraph(Plot* plot) {
|
||||
TimeSeries late_feedback_series("Late feedback results.", LineStyle::kNone,
|
||||
PointStyle::kHighlight);
|
||||
TimeSeries time_series("Network Delay Change", LineStyle::kLine,
|
||||
TimeSeries time_series("Network delay", LineStyle::kLine,
|
||||
PointStyle::kHighlight);
|
||||
int64_t estimated_base_delay_ms = std::numeric_limits<int64_t>::max();
|
||||
int64_t min_send_receive_diff_ms = std::numeric_limits<int64_t>::max();
|
||||
int64_t min_rtt_ms = std::numeric_limits<int64_t>::max();
|
||||
|
||||
int64_t prev_y = 0;
|
||||
for (auto packet : GetNetworkTrace(parsed_log_)) {
|
||||
@ -1311,16 +1312,22 @@ void EventLogAnalyzer::CreateNetworkDelayFeedbackGraph(Plot* plot) {
|
||||
}
|
||||
int64_t y = packet.arrival_time_ms - packet.send_time_ms;
|
||||
prev_y = y;
|
||||
estimated_base_delay_ms = std::min(y, estimated_base_delay_ms);
|
||||
int64_t rtt_ms = packet.feedback_arrival_time_ms - packet.send_time_ms;
|
||||
min_rtt_ms = std::min(rtt_ms, min_rtt_ms);
|
||||
min_send_receive_diff_ms = std::min(y, min_send_receive_diff_ms);
|
||||
time_series.points.emplace_back(x, y);
|
||||
}
|
||||
|
||||
// We assume that the base network delay (w/o queues) is the min delay
|
||||
// observed during the call.
|
||||
// We assume that the base network delay (w/o queues) is equal to half
|
||||
// the minimum RTT. Therefore rescale the delays by subtracting the minimum
|
||||
// observed 1-ways delay and add half the minumum RTT.
|
||||
const int64_t estimated_clock_offset_ms =
|
||||
min_send_receive_diff_ms - min_rtt_ms / 2;
|
||||
for (TimeSeriesPoint& point : time_series.points)
|
||||
point.y -= estimated_base_delay_ms;
|
||||
point.y -= estimated_clock_offset_ms;
|
||||
for (TimeSeriesPoint& point : late_feedback_series.points)
|
||||
point.y -= estimated_base_delay_ms;
|
||||
point.y -= estimated_clock_offset_ms;
|
||||
|
||||
// Add the data set to the plot.
|
||||
plot->AppendTimeSeriesIfNotEmpty(std::move(time_series));
|
||||
plot->AppendTimeSeriesIfNotEmpty(std::move(late_feedback_series));
|
||||
@ -1328,7 +1335,7 @@ void EventLogAnalyzer::CreateNetworkDelayFeedbackGraph(Plot* plot) {
|
||||
plot->SetXAxis(ToCallTimeSec(begin_time_), call_duration_s_, "Time (s)",
|
||||
kLeftMargin, kRightMargin);
|
||||
plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin);
|
||||
plot->SetTitle("Network Delay Change.");
|
||||
plot->SetTitle("Network delay (based on per-packet feedback)");
|
||||
}
|
||||
|
||||
void EventLogAnalyzer::CreatePacerDelayGraph(Plot* plot) {
|
||||
|
||||
Reference in New Issue
Block a user