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

Side by Side Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1720883002: Move RTCP histograms from vie_channel to video channel stats proxies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 10 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
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!rtx_stats_.empty()) { 101 if (!rtx_stats_.empty()) {
102 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps", 102 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps",
103 static_cast<int>(rtx.transmitted.TotalBytes() * 103 static_cast<int>(rtx.transmitted.TotalBytes() *
104 8 / elapsed_sec / 1000)); 104 8 / elapsed_sec / 1000));
105 } 105 }
106 if (config_.rtp.fec.ulpfec_payload_type != -1) { 106 if (config_.rtp.fec.ulpfec_payload_type != -1) {
107 RTC_HISTOGRAM_COUNTS_10000( 107 RTC_HISTOGRAM_COUNTS_10000(
108 "WebRTC.Video.FecBitrateReceivedInKbps", 108 "WebRTC.Video.FecBitrateReceivedInKbps",
109 static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000)); 109 static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000));
110 } 110 }
111 const RtcpPacketTypeCounter& counters = stats_.rtcp_packet_type_counts;
112 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
113 counters.nack_packets * 60 / elapsed_sec);
114 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
115 counters.fir_packets * 60 / elapsed_sec);
116 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
117 counters.pli_packets * 60 / elapsed_sec);
118 if (counters.nack_requests > 0) {
119 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.UniqueNackRequestsSentInPercent",
120 counters.UniqueNackRequestsInPercent());
121 }
111 } 122 }
112 } 123 }
113 124
114 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { 125 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
115 rtc::CritScope lock(&crit_); 126 rtc::CritScope lock(&crit_);
116 return stats_; 127 return stats_;
117 } 128 }
118 129
119 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { 130 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) {
120 rtc::CritScope lock(&crit_); 131 rtc::CritScope lock(&crit_);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 ++num_samples; 265 ++num_samples;
255 } 266 }
256 267
257 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { 268 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const {
258 if (num_samples < min_required_samples || num_samples == 0) 269 if (num_samples < min_required_samples || num_samples == 0)
259 return -1; 270 return -1;
260 return sum / num_samples; 271 return sum / num_samples;
261 } 272 }
262 273
263 } // namespace webrtc 274 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698