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

Unified Diff: webrtc/tools/event_log_visualizer/analyzer.cc

Issue 2165523002: Add loss-based BWE estimate to the outgoing bitrate plot. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use default constructor for POD type. Created 4 years, 5 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
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/event_log_visualizer/analyzer.cc
diff --git a/webrtc/tools/event_log_visualizer/analyzer.cc b/webrtc/tools/event_log_visualizer/analyzer.cc
index ec569990224d2a9d7e951e3e06d24793e98c06e3..e6dd35b6c6fa10e1d62f23cda08b2b36bf9ea792 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.cc
+++ b/webrtc/tools/event_log_visualizer/analyzer.cc
@@ -204,6 +204,12 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
break;
}
case ParsedRtcEventLog::BWE_PACKET_LOSS_EVENT: {
+ BwePacketLossEvent bwe_update;
+ bwe_update.timestamp = parsed_log_.GetTimestamp(i);
+ parsed_log_.GetBwePacketLossEvent(i, &bwe_update.new_bitrate,
+ &bwe_update.fraction_loss,
+ &bwe_update.expected_packets);
+ bwe_loss_updates_.push_back(bwe_update);
break;
}
case ParsedRtcEventLog::BWE_PACKET_DELAY_EVENT: {
@@ -557,6 +563,20 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
}
plot->series.back().style = LINE_GRAPH;
+ // Overlay the send-side bandwidth estimate over the outgoing bitrate.
+ if (desired_direction == kOutgoingPacket) {
+ plot->series.push_back(TimeSeries());
+ for (auto& bwe_update : bwe_loss_updates_) {
+ float x =
+ static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000;
+ float y = static_cast<float>(bwe_update.new_bitrate) / 1000;
+ max_y = std::max(max_y, y);
+ plot->series.back().points.emplace_back(x, y);
+ }
+ plot->series.back().label = "Loss-based estimate";
+ plot->series.back().style = LINE_GRAPH;
+ }
+
plot->xaxis_min = kDefaultXMin;
plot->xaxis_max = (end_time_ - begin_time_) / 1000000 * kXMargin;
plot->xaxis_label = "Time (s)";
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698