Bug 1426710 - The telemetry on how often a backup connection wins should be histogram. r=mayhemer
authorDragana Damjanovic <dd.mozilla@gmail.com>
Mon, 08 Jan 2018 19:28:10 +0100
changeset 452590 4e0e46d3ef07a672fbd2eff8093d42a0530bee95
parent 452533 eeeb7268e4921056013c8fe1f774f18b2db819f3
child 452591 7210063b2d2477847dceea089dbfd6d5432bdad0
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1426710
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426710 - The telemetry on how often a backup connection wins should be histogram. r=mayhemer
netwerk/protocol/http/nsHttpConnectionMgr.cpp
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/Scalars.yaml
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -4330,20 +4330,20 @@ nsHalfOpenSocket::OnOutputStreamReady(ns
     }
 
     if (((mFastOpenStatus == TFO_DISABLED) ||
         (mFastOpenStatus == TFO_HTTP)) && !mBackupConnStatsSet) {
         // Collect telemetry for backup connection being faster than primary
         // connection. We want to collect this telemetry only for cases where
         // TFO is not used.
         mBackupConnStatsSet = true;
-        Telemetry::ScalarSet(Telemetry::ScalarID::NETWORK_HTTP_BACKUP_CONN_WON,
-                             (out == mBackupStreamOut));
-    }
-        
+        Telemetry::Accumulate(Telemetry::NETWORK_HTTP_BACKUP_CONN_WON_1,
+                              (out == mBackupStreamOut));
+    }
+
     nsresult rv =  SetupConn(out, false);
     if (mEnt) {
         mEnt->mDoNotDestroy = false;
     }
     return rv;
 }
 
 bool
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -2436,16 +2436,24 @@
     "record_in_processes": ["main", "content"],
     "expires_in_version": "61",
     "kind": "enumerated",
     "n_values": 8,
     "description": "TCP Fast Open was: 0=enabled during the session, 1=not available or disabled in the os, 2=disabled by the pref, 3=disabled based on the too many connection failures, 4=disable based on too many http transaction stalls after a connection was idle.",
     "alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
     "bug_numbers": [1390881]
   },
+  "NETWORK_HTTP_BACKUP_CONN_WON_1" : {
+    "record_in_processes": ["main"],
+    "expires_in_version": "61",
+    "kind": "boolean",
+    "description": "For connection where TFO has not be use, collect telemetry on whether the backup connection or the primary connection was faster.",
+    "alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
+    "bug_numbers": [1426710]
+  },
   "TLS_EARLY_DATA_NEGOTIATED": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "62",
     "kind": "enumerated",
     "n_values": 3,
     "description": "Sending TLS early data was possible: 0 - not possible, 1 - possible but not used, 2 - possible and used.",
     "alert_emails": ["necko@mozilla.com"],
     "bug_numbers": [1296288]
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -1262,31 +1262,16 @@ screenshots:
     notification_emails:
       - jhirsch@mozilla.com
       - ibicking@mozilla.com
       - clouserw@mozilla.com
     release_channel_collection: opt-out
     record_in_processes:
       - 'main'
 
-network.http:
-  backup_conn_won:
-    bug_numbers:
-      - 1402811
-    description: >
-      For connection where TFO has not be use, collect telemetry on whether the
-      backup connection or the primary connection was faster.
-    expires: "61"
-    kind: boolean
-    notification_emails:
-      - necko@mozilla.com
-      - ddamjanovic@mozilla.com
-    record_in_processes:
-      - 'main'
-
 idb.type:
   persistent_count:
     bug_numbers:
       - 1360567
     description: >
       Number of times indexeddb.open(name, {storage: "persistent"}) has been used.
     expires: "60"
     kind: uint