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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1250203002: Add encode and decode time to histograms stats: (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added todo Created 5 years, 5 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/send_statistics_proxy.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 e028dab2e8d8540d56b2a21fd3bedf042488bc22..6604d3de6f184ea439a825c73892e2982ffb38b7 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -39,13 +39,19 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
if (render_fps > 0)
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond", render_fps);
- const int kMinRequiredSamples = 100;
+ const int kMinRequiredSamples = 200;
int width = render_width_counter_.Avg(kMinRequiredSamples);
int height = render_height_counter_.Avg(kMinRequiredSamples);
if (width != -1) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width);
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height);
}
+ // TODO(asapersson): DecoderTiming() is call periodically (each 1000ms) and
+ // not per frame. Change decode time to include every frame.
+ const int kMinRequiredDecodeSamples = 5;
+ int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
+ if (decode_ms != -1)
+ RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
}
VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
@@ -76,6 +82,7 @@ void ReceiveStatisticsProxy::DecoderTiming(int decode_ms,
stats_.jitter_buffer_ms = jitter_buffer_ms;
stats_.min_playout_delay_ms = min_playout_delay_ms;
stats_.render_delay_ms = render_delay_ms;
+ decode_time_counter_.Add(decode_ms);
}
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698