diff --git a/rtc_tools/event_log_visualizer/analyzer.cc b/rtc_tools/event_log_visualizer/analyzer.cc index 11e33f29e2..6e2bf26eb7 100644 --- a/rtc_tools/event_log_visualizer/analyzer.cc +++ b/rtc_tools/event_log_visualizer/analyzer.cc @@ -567,6 +567,14 @@ void EventLogAnalyzer::CreateRtcpTypeGraph(PacketDirection direction, "Time (s)", kLeftMargin, kRightMargin); plot->SetSuggestedYAxis(0, 1, "RTCP type", kBottomMargin, kTopMargin); plot->SetTitle(GetDirectionAsString(direction) + " RTCP packets"); + plot->SetYAxisTickLabels({{1, "TWCC"}, + {2, "RR"}, + {3, "SR"}, + {4, "XR"}, + {5, "NACK"}, + {6, "REMB"}, + {7, "FIR"}, + {8, "PLI"}}); } template @@ -2116,9 +2124,15 @@ void EventLogAnalyzer::CreateIceCandidatePairConfigGraph(Plot* plot) { plot->SetXAxis(config_.CallBeginTimeSec(), config_.CallEndTimeSec(), "Time (s)", kLeftMargin, kRightMargin); - plot->SetSuggestedYAxis(0, 3, "Numeric Config Type", kBottomMargin, - kTopMargin); + plot->SetSuggestedYAxis(0, 3, "Config Type", kBottomMargin, kTopMargin); plot->SetTitle("[IceEventLog] ICE candidate pair configs"); + plot->SetYAxisTickLabels( + {{static_cast(IceCandidatePairConfigType::kAdded), "ADDED"}, + {static_cast(IceCandidatePairConfigType::kUpdated), "UPDATED"}, + {static_cast(IceCandidatePairConfigType::kDestroyed), + "DESTROYED"}, + {static_cast(IceCandidatePairConfigType::kSelected), + "SELECTED"}}); } std::string EventLogAnalyzer::GetCandidatePairLogDescriptionFromId( @@ -2142,6 +2156,8 @@ std::string EventLogAnalyzer::GetCandidatePairLogDescriptionFromId( } void EventLogAnalyzer::CreateIceConnectivityCheckGraph(Plot* plot) { + constexpr int kEventTypeOffset = + static_cast(IceCandidatePairConfigType::kNumValues); std::map checks_by_cp_id; for (const auto& event : parsed_log_.ice_candidate_pair_events()) { if (checks_by_cp_id.find(event.candidate_pair_id) == @@ -2152,9 +2168,7 @@ void EventLogAnalyzer::CreateIceConnectivityCheckGraph(Plot* plot) { LineStyle::kNone, PointStyle::kHighlight); } float x = config_.GetCallTimeSec(event.log_time_us()); - constexpr int kIceCandidatePairEventTypeOffset = - static_cast(IceCandidatePairConfigType::kNumValues); - float y = static_cast(event.type) + kIceCandidatePairEventTypeOffset; + float y = static_cast(event.type) + kEventTypeOffset; checks_by_cp_id[event.candidate_pair_id].points.emplace_back(x, y); } @@ -2165,9 +2179,23 @@ void EventLogAnalyzer::CreateIceConnectivityCheckGraph(Plot* plot) { plot->SetXAxis(config_.CallBeginTimeSec(), config_.CallEndTimeSec(), "Time (s)", kLeftMargin, kRightMargin); - plot->SetSuggestedYAxis(0, 4, "Numeric Connectivity State", kBottomMargin, + plot->SetSuggestedYAxis(0, 4, "Connectivity State", kBottomMargin, kTopMargin); plot->SetTitle("[IceEventLog] ICE connectivity checks"); + + plot->SetYAxisTickLabels( + {{static_cast(IceCandidatePairEventType::kCheckSent) + + kEventTypeOffset, + "CHECK SENT"}, + {static_cast(IceCandidatePairEventType::kCheckReceived) + + kEventTypeOffset, + "CHECK RECEIVED"}, + {static_cast(IceCandidatePairEventType::kCheckResponseSent) + + kEventTypeOffset, + "RESPONSE SENT"}, + {static_cast(IceCandidatePairEventType::kCheckResponseReceived) + + kEventTypeOffset, + "RESPONSE RECEIVED"}}); } void EventLogAnalyzer::CreateDtlsTransportStateGraph(Plot* plot) { @@ -2182,8 +2210,14 @@ void EventLogAnalyzer::CreateDtlsTransportStateGraph(Plot* plot) { plot->SetXAxis(config_.CallBeginTimeSec(), config_.CallEndTimeSec(), "Time (s)", kLeftMargin, kRightMargin); plot->SetSuggestedYAxis(0, static_cast(DtlsTransportState::kNumValues), - "Numeric Transport State", kBottomMargin, kTopMargin); + "Transport State", kBottomMargin, kTopMargin); plot->SetTitle("DTLS Transport State"); + plot->SetYAxisTickLabels( + {{static_cast(DtlsTransportState::kNew), "NEW"}, + {static_cast(DtlsTransportState::kConnecting), "CONNECTING"}, + {static_cast(DtlsTransportState::kConnected), "CONNECTED"}, + {static_cast(DtlsTransportState::kClosed), "CLOSED"}, + {static_cast(DtlsTransportState::kFailed), "FAILED"}}); } void EventLogAnalyzer::CreateDtlsWritableStateGraph(Plot* plot) {