| Index: webrtc/video/receive_statistics_proxy.cc
|
| diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
|
| index 649ea0cd6e0523ccb7a4ba9df512608a805ff482..df0fa403ef9ed388c612cb081229fe965cd6c5f7 100644
|
| --- a/webrtc/video/receive_statistics_proxy.cc
|
| +++ b/webrtc/video/receive_statistics_proxy.cc
|
| @@ -21,6 +21,7 @@ namespace webrtc {
|
|
|
| ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock)
|
| : clock_(clock),
|
| + start_time_ms_(clock->TimeInMilliseconds()),
|
| // 1000ms window, scale 1000 for ms to s.
|
| decode_fps_estimator_(1000, 1000),
|
| renders_fps_estimator_(1000, 1000),
|
| @@ -68,6 +69,22 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
|
| int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
|
| if (delay_ms != -1)
|
| RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
|
| +
|
| + int64_t elapsed_sec = (clock_->TimeInMilliseconds() - start_time_ms_) / 1000;
|
| + if (elapsed_sec >= metrics::kMinRunTimeInSeconds) {
|
| + const RtcpPacketTypeCounter& counters = stats_.rtcp_packet_type_counts;
|
| +
|
| + RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
|
| + counters.nack_packets * 60 / elapsed_sec);
|
| + RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
|
| + counters.fir_packets * 60 / elapsed_sec);
|
| + RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
|
| + counters.pli_packets * 60 / elapsed_sec);
|
| + if (counters.nack_requests > 0) {
|
| + RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.UniqueNackRequestsSentInPercent",
|
| + counters.UniqueNackRequestsInPercent());
|
| + }
|
| + }
|
| }
|
|
|
| VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
|
|
|