Bug 1227708 - Differentiate ICE_SUCCESS_RATE telemetry for loop vs webrtc r=jesup

This commit is contained in:
Jan-Ivar Bruaroey 2015-11-30 18:15:20 -05:00
parent e47c2ce345
commit fd2c67cb96

View File

@ -424,6 +424,10 @@ RTCPeerConnection.prototype = {
this.__DOM_IMPL__._innerObject = this;
this._observer = new this._win.PeerConnectionObserver(this.__DOM_IMPL__);
var location = "" + this._win.location;
this._isLoop = location.startsWith("about:loop") ||
location.startsWith("https://hello.firefox.com/");
// Add a reference to the PeerConnection to global list (before init).
_globalPCList.addPC(this);
@ -1329,7 +1333,8 @@ PeerConnectionObserver.prototype = {
checking_histogram.add(false);
}
} else if (this._dompc.iceConnectionState === 'checking') {
var success_histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_SUCCESS_RATE");
var success_histogram = Services.telemetry.getHistogramById(this._dompc._isLoop ?
"LOOP_ICE_SUCCESS_RATE" : "WEBRTC_ICE_SUCCESS_RATE");
if (iceConnectionState === 'completed' ||
iceConnectionState === 'connected') {
success_histogram.add(true);