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

Side by Side Diff: webrtc/tools/event_log_visualizer/analyzer.cc

Issue 2782553005: Visualize events related to probing in the total bitrate graph. (Closed)
Patch Set: GRAPH --> CHART Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 break; 470 break;
471 } 471 }
472 case ParsedRtcEventLog::AUDIO_NETWORK_ADAPTATION_EVENT: { 472 case ParsedRtcEventLog::AUDIO_NETWORK_ADAPTATION_EVENT: {
473 AudioNetworkAdaptationEvent ana_event; 473 AudioNetworkAdaptationEvent ana_event;
474 ana_event.timestamp = parsed_log_.GetTimestamp(i); 474 ana_event.timestamp = parsed_log_.GetTimestamp(i);
475 parsed_log_.GetAudioNetworkAdaptation(i, &ana_event.config); 475 parsed_log_.GetAudioNetworkAdaptation(i, &ana_event.config);
476 audio_network_adaptation_events_.push_back(ana_event); 476 audio_network_adaptation_events_.push_back(ana_event);
477 break; 477 break;
478 } 478 }
479 case ParsedRtcEventLog::BWE_PROBE_CLUSTER_CREATED_EVENT: { 479 case ParsedRtcEventLog::BWE_PROBE_CLUSTER_CREATED_EVENT: {
480 bwe_probe_cluster_created_events_.push_back(
481 parsed_log_.GetBweProbeClusterCreated(i));
480 break; 482 break;
481 } 483 }
482 case ParsedRtcEventLog::BWE_PROBE_RESULT_EVENT: { 484 case ParsedRtcEventLog::BWE_PROBE_RESULT_EVENT: {
485 bwe_probe_result_events_.push_back(parsed_log_.GetBweProbeResult(i));
483 break; 486 break;
484 } 487 }
485 case ParsedRtcEventLog::UNKNOWN_EVENT: { 488 case ParsedRtcEventLog::UNKNOWN_EVENT: {
486 break; 489 break;
487 } 490 }
488 } 491 }
489 } 492 }
490 493
491 if (last_timestamp < first_timestamp) { 494 if (last_timestamp < first_timestamp) {
492 // No useful events in the log. 495 // No useful events in the log.
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 // Overlay the send-side bandwidth estimate over the outgoing bitrate. 934 // Overlay the send-side bandwidth estimate over the outgoing bitrate.
932 if (desired_direction == kOutgoingPacket) { 935 if (desired_direction == kOutgoingPacket) {
933 TimeSeries* time_series = 936 TimeSeries* time_series =
934 plot->AddTimeSeries("Loss-based estimate", LINE_STEP_GRAPH); 937 plot->AddTimeSeries("Loss-based estimate", LINE_STEP_GRAPH);
935 for (auto& bwe_update : bwe_loss_updates_) { 938 for (auto& bwe_update : bwe_loss_updates_) {
936 float x = 939 float x =
937 static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000; 940 static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000;
938 float y = static_cast<float>(bwe_update.new_bitrate) / 1000; 941 float y = static_cast<float>(bwe_update.new_bitrate) / 1000;
939 time_series->points.emplace_back(x, y); 942 time_series->points.emplace_back(x, y);
940 } 943 }
944
945 TimeSeries* created_series =
946 plot->AddTimeSeries("Probe cluster created.", DOT_GRAPH);
947 for (auto& cluster : bwe_probe_cluster_created_events_) {
948 float x = static_cast<float>(cluster.timestamp - begin_time_) / 1000000;
949 float y = static_cast<float>(cluster.bitrate_bps) / 1000;
950 created_series->points.emplace_back(x, y);
951 }
952
953 TimeSeries* result_series =
954 plot->AddTimeSeries("Probing results.", DOT_GRAPH);
955 for (auto& result : bwe_probe_result_events_) {
956 if (result.bitrate_bps) {
957 float x = static_cast<float>(result.timestamp - begin_time_) / 1000000;
958 float y = static_cast<float>(*result.bitrate_bps) / 1000;
959 result_series->points.emplace_back(x, y);
960 }
961 }
941 } 962 }
963
942 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 964 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
943 plot->SetSuggestedYAxis(0, 1, "Bitrate (kbps)", kBottomMargin, kTopMargin); 965 plot->SetSuggestedYAxis(0, 1, "Bitrate (kbps)", kBottomMargin, kTopMargin);
944 if (desired_direction == webrtc::PacketDirection::kIncomingPacket) { 966 if (desired_direction == webrtc::PacketDirection::kIncomingPacket) {
945 plot->SetTitle("Incoming RTP bitrate"); 967 plot->SetTitle("Incoming RTP bitrate");
946 } else if (desired_direction == webrtc::PacketDirection::kOutgoingPacket) { 968 } else if (desired_direction == webrtc::PacketDirection::kOutgoingPacket) {
947 plot->SetTitle("Outgoing RTP bitrate"); 969 plot->SetTitle("Outgoing RTP bitrate");
948 } 970 }
949 } 971 }
950 972
951 // For each SSRC, plot the bandwidth used by that stream. 973 // For each SSRC, plot the bandwidth used by that stream.
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 return rtc::Optional<float>(); 1376 return rtc::Optional<float>();
1355 }, 1377 },
1356 audio_network_adaptation_events_, begin_time_, time_series); 1378 audio_network_adaptation_events_, begin_time_, time_series);
1357 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 1379 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
1358 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", 1380 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))",
1359 kBottomMargin, kTopMargin); 1381 kBottomMargin, kTopMargin);
1360 plot->SetTitle("Reported audio encoder number of channels"); 1382 plot->SetTitle("Reported audio encoder number of channels");
1361 } 1383 }
1362 } // namespace plotting 1384 } // namespace plotting
1363 } // namespace webrtc 1385 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.h ('k') | webrtc/tools/event_log_visualizer/chart.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698