Plot RTCP types for incoming and outgoing RTCP packets.
Bug: webrtc:10312 Change-Id: I9908f9c0a6f419a36bb25ad8f15afb5e29de0f03 Reviewed-on: https://webrtc-review.googlesource.com/c/122884 Commit-Queue: Björn Terelius <terelius@webrtc.org> Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26714}
This commit is contained in:

committed by
Commit Bot

parent
c39f462b2d
commit
7c974e61be
@ -321,6 +321,20 @@ void MovingAverage(
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
TimeSeries CreateRtcpTypeTimeSeries(const std::vector<T>& rtcp_list,
|
||||
AnalyzerConfig config,
|
||||
std::string rtcp_name,
|
||||
int category_id) {
|
||||
TimeSeries time_series(rtcp_name, LineStyle::kNone, PointStyle::kHighlight);
|
||||
for (const auto& rtcp : rtcp_list) {
|
||||
float x = config.GetCallTimeSec(rtcp.log_time_us());
|
||||
float y = category_id;
|
||||
time_series.points.emplace_back(x, y);
|
||||
}
|
||||
return time_series;
|
||||
}
|
||||
|
||||
const char kUnknownEnumValue[] = "unknown";
|
||||
|
||||
const char kIceCandidateTypeLocal[] = "local";
|
||||
@ -538,6 +552,30 @@ void EventLogAnalyzer::CreatePacketGraph(PacketDirection direction,
|
||||
plot->SetTitle(GetDirectionAsString(direction) + " RTP packets");
|
||||
}
|
||||
|
||||
void EventLogAnalyzer::CreateRtcpTypeGraph(PacketDirection direction,
|
||||
Plot* plot) {
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(
|
||||
parsed_log_.transport_feedbacks(direction), config_, "TWCC", 1));
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(
|
||||
parsed_log_.receiver_reports(direction), config_, "RR", 2));
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(
|
||||
parsed_log_.sender_reports(direction), config_, "SR", 3));
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(
|
||||
parsed_log_.extended_reports(direction), config_, "XR", 4));
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(parsed_log_.nacks(direction),
|
||||
config_, "NACK", 5));
|
||||
plot->AppendTimeSeries(CreateRtcpTypeTimeSeries(parsed_log_.rembs(direction),
|
||||
config_, "REMB", 6));
|
||||
plot->AppendTimeSeries(
|
||||
CreateRtcpTypeTimeSeries(parsed_log_.firs(direction), config_, "FIR", 7));
|
||||
plot->AppendTimeSeries(
|
||||
CreateRtcpTypeTimeSeries(parsed_log_.plis(direction), config_, "PLI", 8));
|
||||
plot->SetXAxis(config_.CallBeginTimeSec(), config_.CallEndTimeSec(),
|
||||
"Time (s)", kLeftMargin, kRightMargin);
|
||||
plot->SetSuggestedYAxis(0, 1, "RTCP type", kBottomMargin, kTopMargin);
|
||||
plot->SetTitle(GetDirectionAsString(direction) + " RTCP packets");
|
||||
}
|
||||
|
||||
template <typename IterableType>
|
||||
void EventLogAnalyzer::CreateAccumulatedPacketsTimeSeries(
|
||||
Plot* plot,
|
||||
|
@ -59,6 +59,8 @@ class EventLogAnalyzer {
|
||||
|
||||
void CreatePacketGraph(PacketDirection direction, Plot* plot);
|
||||
|
||||
void CreateRtcpTypeGraph(PacketDirection direction, Plot* plot);
|
||||
|
||||
void CreateAccumulatedPacketsGraph(PacketDirection direction, Plot* plot);
|
||||
|
||||
void CreatePlayoutGraph(Plot* plot);
|
||||
|
@ -43,6 +43,12 @@ WEBRTC_DEFINE_bool(plot_incoming_packet_sizes,
|
||||
WEBRTC_DEFINE_bool(plot_outgoing_packet_sizes,
|
||||
false,
|
||||
"Plot bar graph showing the size of each outgoing packet.");
|
||||
WEBRTC_DEFINE_bool(plot_incoming_rtcp_types,
|
||||
false,
|
||||
"Plot the RTCP block types for incoming RTCP packets.");
|
||||
WEBRTC_DEFINE_bool(plot_outgoing_rtcp_types,
|
||||
false,
|
||||
"Plot the RTCP block types for outgoing RTCP packets.");
|
||||
WEBRTC_DEFINE_bool(
|
||||
plot_incoming_packet_count,
|
||||
false,
|
||||
@ -287,6 +293,14 @@ int main(int argc, char* argv[]) {
|
||||
analyzer.CreatePacketGraph(webrtc::kOutgoingPacket,
|
||||
collection->AppendNewPlot());
|
||||
}
|
||||
if (FLAG_plot_incoming_rtcp_types) {
|
||||
analyzer.CreateRtcpTypeGraph(webrtc::kIncomingPacket,
|
||||
collection->AppendNewPlot());
|
||||
}
|
||||
if (FLAG_plot_outgoing_rtcp_types) {
|
||||
analyzer.CreateRtcpTypeGraph(webrtc::kOutgoingPacket,
|
||||
collection->AppendNewPlot());
|
||||
}
|
||||
if (FLAG_plot_incoming_packet_count) {
|
||||
analyzer.CreateAccumulatedPacketsGraph(webrtc::kIncomingPacket,
|
||||
collection->AppendNewPlot());
|
||||
@ -495,6 +509,8 @@ int main(int argc, char* argv[]) {
|
||||
void SetAllPlotFlags(bool setting) {
|
||||
FLAG_plot_incoming_packet_sizes = setting;
|
||||
FLAG_plot_outgoing_packet_sizes = setting;
|
||||
FLAG_plot_incoming_rtcp_types = setting;
|
||||
FLAG_plot_outgoing_rtcp_types = setting;
|
||||
FLAG_plot_incoming_packet_count = setting;
|
||||
FLAG_plot_outgoing_packet_count = setting;
|
||||
FLAG_plot_audio_playout = setting;
|
||||
|
Reference in New Issue
Block a user