| Index: webrtc/rtc_tools/event_log_visualizer/analyzer.cc
|
| diff --git a/webrtc/rtc_tools/event_log_visualizer/analyzer.cc b/webrtc/rtc_tools/event_log_visualizer/analyzer.cc
|
| index 4d485c72d1ea6778336c2830ff594da458ae4231..ba387e54d4b899b8b1b91abf6a938476e99c37da 100644
|
| --- a/webrtc/rtc_tools/event_log_visualizer/analyzer.cc
|
| +++ b/webrtc/rtc_tools/event_log_visualizer/analyzer.cc
|
| @@ -509,6 +509,18 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
|
| bwe_probe_result_events_.push_back(parsed_log_.GetBweProbeResult(i));
|
| break;
|
| }
|
| + case ParsedRtcEventLog::BWE_ACKED_BITRATE_EVENT: {
|
| + acked_bitrate_events_.push_back(parsed_log_.GetAckedBitrate(i));
|
| + break;
|
| + }
|
| + case ParsedRtcEventLog::ALR_STATE_EVENT: {
|
| + alr_state_events_.push_back(parsed_log_.GetAlrState(i));
|
| + break;
|
| + }
|
| + case ParsedRtcEventLog::PACKET_QUEUE_TIME: {
|
| + packet_queue_time_events_.push_back(parsed_log_.GetQueueTime(i));
|
| + break;
|
| + }
|
| case ParsedRtcEventLog::UNKNOWN_EVENT: {
|
| break;
|
| }
|
| @@ -1023,10 +1035,41 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
|
| }
|
| }
|
|
|
| + TimeSeries acked_bitrate("Acked bitrate", LINE_GRAPH);
|
| + for (auto& ab : acked_bitrate_events_) {
|
| + float x = static_cast<float>(ab.timestamp - begin_time_) / 1000000;
|
| + float y = static_cast<float>(ab.bitrate_bps / 1000);
|
| + acked_bitrate.points.emplace_back(x, y);
|
| + }
|
| +
|
| + TimeSeries alr_usage("Bitrate usage", LINE_GRAPH);
|
| + IntervalSeries alr_state("ALR", "#555555", IntervalSeries::kHorizontal);
|
| + bool in_alr = false;
|
| + int64_t alr_start = 0;
|
| + for (auto& alr : alr_state_events_) {
|
| + float y = static_cast<float>(alr.timestamp - begin_time_) / 1000000;
|
| + alr_usage.points.emplace_back(y, alr.usage_bps / 1000);
|
| + if (!in_alr && alr.in_alr) {
|
| + alr_start = alr.timestamp;
|
| + in_alr = true;
|
| + } else if (in_alr && !alr.in_alr) {
|
| + float x = static_cast<float>(alr_start - begin_time_) / 1000000;
|
| + alr_state.intervals.emplace_back(x, y);
|
| + in_alr = false;
|
| + }
|
| + }
|
| +
|
| + if (in_alr) {
|
| + float x = static_cast<float>(alr_start - begin_time_) / 1000000;
|
| + float y = static_cast<float>(end_time_ - begin_time_) / 1000000;
|
| + alr_state.intervals.emplace_back(x, y);
|
| + }
|
| +
|
| if (show_detector_state) {
|
| plot->AppendIntervalSeries(std::move(overusing_series));
|
| plot->AppendIntervalSeries(std::move(underusing_series));
|
| plot->AppendIntervalSeries(std::move(normal_series));
|
| + plot->AppendIntervalSeries(std::move(alr_state));
|
| }
|
|
|
| plot->AppendTimeSeries(std::move(bitrate_series));
|
| @@ -1034,6 +1077,8 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
|
| plot->AppendTimeSeries(std::move(delay_series));
|
| plot->AppendTimeSeries(std::move(created_series));
|
| plot->AppendTimeSeries(std::move(result_series));
|
| + plot->AppendTimeSeries(std::move(acked_bitrate));
|
| + plot->AppendTimeSeries(std::move(alr_usage));
|
| }
|
|
|
| // Overlay the incoming REMB over the outgoing bitrate
|
| @@ -1071,6 +1116,33 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
|
| }
|
| }
|
|
|
| +void EventLogAnalyzer::CreateQueueDelayGraph(Plot* plot) {
|
| + std::map<uint32_t, TimeSeries> series;
|
| + float max = 0;
|
| + for (auto& qt : packet_queue_time_events_) {
|
| + auto it = series.find(qt.ssrc);
|
| + if (it == series.end()) {
|
| + std::stringstream ss;
|
| + ss << "SSRC " << qt.ssrc;
|
| + it = series
|
| + .insert(std::make_pair(qt.ssrc,
|
| + TimeSeries(ss.str(), LINE_DOT_GRAPH)))
|
| + .first;
|
| + }
|
| +
|
| + float x = static_cast<float>(qt.timestamp - begin_time_) / 1000000;
|
| + float y = static_cast<float>(qt.queue_time_ms);
|
| + max = y > max ? y : max;
|
| + it->second.points.emplace_back(x, y);
|
| + }
|
| +
|
| + for (auto& ts : series)
|
| + plot->AppendTimeSeries(std::move(ts.second));
|
| + plot->SetTitle("Pacer queue time");
|
| + plot->SetXAxis(0, call_duration_s_, "Time (s)");
|
| + plot->SetYAxis(0, max * 1.1, "Time (ms)");
|
| +}
|
| +
|
| // For each SSRC, plot the bandwidth used by that stream.
|
| void EventLogAnalyzer::CreateStreamBitrateGraph(
|
| PacketDirection desired_direction,
|
|
|