| OLD | NEW |
| 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 26 matching lines...) Expand all Loading... |
| 37 void ReceiveStatisticsProxy::UpdateHistograms() { | 37 void ReceiveStatisticsProxy::UpdateHistograms() { |
| 38 int fraction_lost = report_block_stats_.FractionLostInPercent(); | 38 int fraction_lost = report_block_stats_.FractionLostInPercent(); |
| 39 if (fraction_lost != -1) { | 39 if (fraction_lost != -1) { |
| 40 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent", | 40 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent", |
| 41 fraction_lost); | 41 fraction_lost); |
| 42 } | 42 } |
| 43 const int kMinRequiredSamples = 200; | 43 const int kMinRequiredSamples = 200; |
| 44 int samples = static_cast<int>(render_fps_tracker_.TotalSampleCount()); | 44 int samples = static_cast<int>(render_fps_tracker_.TotalSampleCount()); |
| 45 if (samples > kMinRequiredSamples) { | 45 if (samples > kMinRequiredSamples) { |
| 46 RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond", | 46 RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond", |
| 47 static_cast<int>(render_fps_tracker_.ComputeTotalRate())); | 47 round(render_fps_tracker_.ComputeTotalRate())); |
| 48 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.RenderSqrtPixelsPerSecond", | 48 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.RenderSqrtPixelsPerSecond", |
| 49 static_cast<int>(render_pixel_tracker_.ComputeTotalRate())); | 49 round(render_pixel_tracker_.ComputeTotalRate())); |
| 50 } | 50 } |
| 51 int width = render_width_counter_.Avg(kMinRequiredSamples); | 51 int width = render_width_counter_.Avg(kMinRequiredSamples); |
| 52 int height = render_height_counter_.Avg(kMinRequiredSamples); | 52 int height = render_height_counter_.Avg(kMinRequiredSamples); |
| 53 if (width != -1) { | 53 if (width != -1) { |
| 54 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width); | 54 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width); |
| 55 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height); | 55 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height); |
| 56 } | 56 } |
| 57 int qp = qp_counters_.vp8.Avg(kMinRequiredSamples); | 57 int qp = qp_counters_.vp8.Avg(kMinRequiredSamples); |
| 58 if (qp != -1) | 58 if (qp != -1) |
| 59 RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp); | 59 RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 ++num_samples; | 201 ++num_samples; |
| 202 } | 202 } |
| 203 | 203 |
| 204 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 204 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |
| 205 if (num_samples < min_required_samples || num_samples == 0) | 205 if (num_samples < min_required_samples || num_samples == 0) |
| 206 return -1; | 206 return -1; |
| 207 return sum / num_samples; | 207 return sum / num_samples; |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace webrtc | 210 } // namespace webrtc |
| OLD | NEW |