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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 1155833006: Making TimeToConnect metric more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 26c412753b2809a9ca15ea25e12c041a12415847..8c3f1fa76c3c97cf18d2772f19d67c5d1a14e6e2 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -1306,9 +1306,18 @@ void RTCPeerConnectionHandler::OnIceConnectionChange(
// If the state becomes connected, send the time needed for PC to become
// connected from checking to UMA. UMA data will help to know how much
// time needed for PC to connect with remote peer.
+ if (ice_connection_checking_start_.is_null()) {
+ // From UMA, we have observed a large number of calls falling into the
+ // overflow buckets. One possibility is that the Checking is not signaled
+ // before Connected. This is to guard against that situation to make the
+ // metric more robust.
+ UMA_HISTOGRAM_MEDIUM_TIMES("WebRTC.PeerConnection.TimeToConnect",
+ base::TimeDelta());
+ } else {
UMA_HISTOGRAM_MEDIUM_TIMES(
"WebRTC.PeerConnection.TimeToConnect",
base::TimeTicks::Now() - ice_connection_checking_start_);
+ }
}
track_metrics_.IceConnectionChange(new_state);
« 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