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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 2136533002: Only update codec type histogram if lifetime is long enough (10 sec). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 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 57d1f569cfd9168783cad153ec8a4df9aa7f2398..90575436a24b7424869e534c85ca13700e201cde 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -24,6 +24,7 @@ ReceiveStatisticsProxy::ReceiveStatisticsProxy(
Clock* clock)
: clock_(clock),
config_(*config),
+ start_ms_(clock->TimeInMilliseconds()),
// 1000ms window, scale 1000 for ms to s.
decode_fps_estimator_(1000, 1000),
renders_fps_estimator_(1000, 1000),
@@ -39,6 +40,10 @@ ReceiveStatisticsProxy::~ReceiveStatisticsProxy() {
}
void ReceiveStatisticsProxy::UpdateHistograms() {
+ RTC_LOGGED_HISTOGRAM_COUNTS_100000(
+ "WebRTC.Video.ReceiveStreamLifetimeInSeconds",
+ (clock_->TimeInMilliseconds() - start_ms_) / 1000);
+
int fraction_lost = report_block_stats_.FractionLostInPercent();
if (fraction_lost != -1) {
RTC_LOGGED_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent",
« 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