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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1351403008: Add delay metric (includes network delay (rtt/2) + jitter delay + decode time + (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy.cc
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
index b6063a80afbb1719b2c013a0881a52910da3a38d..534428b7eeec9b6d8ff49ffe0cb8d94650632394 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -53,6 +53,10 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
if (decode_ms != -1)
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
+
+ int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
+ if (delay_ms != -1)
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
}
VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
@@ -78,7 +82,8 @@ void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
int target_delay_ms,
int jitter_buffer_ms,
int min_playout_delay_ms,
- int render_delay_ms) {
+ int render_delay_ms,
+ int64_t rtt_ms) {
rtc::CritScope lock(&crit_);
stats_.decode_ms = decode_ms;
stats_.max_decode_ms = max_decode_ms;
@@ -88,6 +93,9 @@ void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
stats_.min_playout_delay_ms = min_playout_delay_ms;
stats_.render_delay_ms = render_delay_ms;
decode_time_counter_.Add(decode_ms);
+ // Network delay (rtt/2) + target_delay_ms (jitter delay + decode time +
+ // render delay).
+ delay_counter_.Add(target_delay_ms + rtt_ms / 2);
}
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698