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

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

Issue 2729903002: Increase kMinRequiredSamples (5 -> 200) for updating histogram stats from OnFrameBufferTimingsUpdat… (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 int key_frames_permille = 139 int key_frames_permille =
140 (num_key_frames * 1000.0f / num_total_frames + 0.5f); 140 (num_key_frames * 1000.0f / num_total_frames + 0.5f);
141 RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.KeyFramesReceivedInPermille", 141 RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.KeyFramesReceivedInPermille",
142 key_frames_permille); 142 key_frames_permille);
143 } 143 }
144 144
145 int qp = qp_counters_.vp8.Avg(kMinRequiredSamples); 145 int qp = qp_counters_.vp8.Avg(kMinRequiredSamples);
146 if (qp != -1) 146 if (qp != -1)
147 RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp); 147 RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp);
148 148
149 // TODO(asapersson): DecoderTiming() is call periodically (each 1000ms) and 149 int decode_ms = decode_time_counter_.Avg(kMinRequiredSamples);
150 // not per frame. Change decode time to include every frame.
151 const int kMinRequiredDecodeSamples = 5;
152 int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
153 if (decode_ms != -1) 150 if (decode_ms != -1)
154 RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms); 151 RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
155 152
156 int jb_delay_ms = jitter_buffer_delay_counter_.Avg(kMinRequiredDecodeSamples); 153 int jb_delay_ms = jitter_buffer_delay_counter_.Avg(kMinRequiredSamples);
157 if (jb_delay_ms != -1) { 154 if (jb_delay_ms != -1) {
158 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.JitterBufferDelayInMs", 155 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.JitterBufferDelayInMs",
159 jb_delay_ms); 156 jb_delay_ms);
160 } 157 }
161 158
162 int target_delay_ms = target_delay_counter_.Avg(kMinRequiredDecodeSamples); 159 int target_delay_ms = target_delay_counter_.Avg(kMinRequiredSamples);
163 if (target_delay_ms != -1) { 160 if (target_delay_ms != -1) {
164 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.TargetDelayInMs", target_delay_ms); 161 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.TargetDelayInMs", target_delay_ms);
165 } 162 }
166 int current_delay_ms = current_delay_counter_.Avg(kMinRequiredDecodeSamples); 163 int current_delay_ms = current_delay_counter_.Avg(kMinRequiredSamples);
167 if (current_delay_ms != -1) { 164 if (current_delay_ms != -1) {
168 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.CurrentDelayInMs", 165 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.CurrentDelayInMs",
169 current_delay_ms); 166 current_delay_ms);
170 } 167 }
171 int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples); 168 int delay_ms = delay_counter_.Avg(kMinRequiredSamples);
172 if (delay_ms != -1) 169 if (delay_ms != -1)
173 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms); 170 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
174 171
175 int e2e_delay_ms = e2e_delay_counter_.Avg(kMinRequiredSamples); 172 int e2e_delay_ms = e2e_delay_counter_.Avg(kMinRequiredSamples);
176 if (e2e_delay_ms != -1) 173 if (e2e_delay_ms != -1)
177 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs", e2e_delay_ms); 174 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs", e2e_delay_ms);
178 175
179 StreamDataCounters rtp = stats_.rtp_stats; 176 StreamDataCounters rtp = stats_.rtp_stats;
180 StreamDataCounters rtx; 177 StreamDataCounters rtx;
181 for (auto it : rtx_stats_) 178 for (auto it : rtx_stats_)
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 sum = 0; 548 sum = 0;
552 } 549 }
553 550
554 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, 551 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms,
555 int64_t max_rtt_ms) { 552 int64_t max_rtt_ms) {
556 rtc::CritScope lock(&crit_); 553 rtc::CritScope lock(&crit_);
557 avg_rtt_ms_ = avg_rtt_ms; 554 avg_rtt_ms_ = avg_rtt_ms;
558 } 555 }
559 556
560 } // namespace webrtc 557 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698