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

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

Issue 2204713005: Add fraction loss in visualization tool. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 // Add the data set to the plot. 531 // Add the data set to the plot.
532 plot->series_list_.push_back(std::move(time_series)); 532 plot->series_list_.push_back(std::move(time_series));
533 } 533 }
534 534
535 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 535 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
536 plot->SetSuggestedYAxis(0, 1, "Latency change (ms)", kBottomMargin, 536 plot->SetSuggestedYAxis(0, 1, "Latency change (ms)", kBottomMargin,
537 kTopMargin); 537 kTopMargin);
538 plot->SetTitle("Accumulated network latency change"); 538 plot->SetTitle("Accumulated network latency change");
539 } 539 }
540 540
541 // Plot the fraction of packets lost (as perceived by the loss-based BWE).
542 void EventLogAnalyzer::CreateFractionLossGraph(Plot* plot) {
543 plot->series_list_.push_back(TimeSeries());
544 for (auto& bwe_update : bwe_loss_updates_) {
545 float x = static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000;
546 float y = static_cast<float>(bwe_update.fraction_loss) / 255 * 100;
547 plot->series_list_.back().points.emplace_back(x, y);
548 }
549 plot->series_list_.back().label = "Fraction lost";
550 plot->series_list_.back().style = LINE_DOT_GRAPH;
551
552 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
553 plot->SetSuggestedYAxis(0, 10, "Percent lost packets", kBottomMargin,
554 kTopMargin);
555 plot->SetTitle("Reported packet loss");
556 }
557
541 // Plot the total bandwidth used by all RTP streams. 558 // Plot the total bandwidth used by all RTP streams.
542 void EventLogAnalyzer::CreateTotalBitrateGraph( 559 void EventLogAnalyzer::CreateTotalBitrateGraph(
543 PacketDirection desired_direction, 560 PacketDirection desired_direction,
544 Plot* plot) { 561 Plot* plot) {
545 struct TimestampSize { 562 struct TimestampSize {
546 TimestampSize(uint64_t t, size_t s) : timestamp(t), size(s) {} 563 TimestampSize(uint64_t t, size_t s) : timestamp(t), size(s) {}
547 uint64_t timestamp; 564 uint64_t timestamp;
548 size_t size; 565 size_t size;
549 }; 566 };
550 std::vector<TimestampSize> packets; 567 std::vector<TimestampSize> packets;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 point.y -= estimated_base_delay_ms; 898 point.y -= estimated_base_delay_ms;
882 // Add the data set to the plot. 899 // Add the data set to the plot.
883 plot->series_list_.push_back(std::move(time_series)); 900 plot->series_list_.push_back(std::move(time_series));
884 901
885 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 902 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
886 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin); 903 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin);
887 plot->SetTitle("Network Delay Change."); 904 plot->SetTitle("Network Delay Change.");
888 } 905 }
889 } // namespace plotting 906 } // namespace plotting
890 } // namespace webrtc 907 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.h ('k') | webrtc/tools/event_log_visualizer/generate_timeseries.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698