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

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: 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..04e5fd94151878ae6efa89db45b57b1c61557981 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.cc
+++ b/webrtc/tools/event_log_visualizer/analyzer.cc
@@ -204,6 +204,14 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
break;
}
case ParsedRtcEventLog::BWE_PACKET_LOSS_EVENT: {
+ uint64_t timestamp = parsed_log_.GetTimestamp(i);
+ int32_t bitrate;
+ uint8_t fraction_loss;
+ int32_t expected_packets;
+ parsed_log_.GetBwePacketLossEvent(i, &bitrate, &fraction_loss,
+ &expected_packets);
+ bwe_loss_updates_.push_back(BwePacketLossEvent(
ivoc 2016/07/19 09:42:48 You could use emplace_back here to construct the o
terelius 2016/07/19 13:06:18 Changed the GetBwePacketLossEvent to write the dir
+ timestamp, bitrate, fraction_loss, expected_packets));
break;
}
case ParsedRtcEventLog::BWE_PACKET_DELAY_EVENT: {
@@ -557,6 +565,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.push_back(TimeSeriesPoint(x, y));
ivoc 2016/07/19 09:42:48 Another opportunity for emplace_back.
terelius 2016/07/19 13:06:18 Done.
+ }
+ 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