Bug 1504247 - Define a high-resolution page load time histogram r=dao,chutten
authorTim D. Smith <tdsmith@mozilla.com>
Wed, 14 Nov 2018 21:37:51 +0000
changeset 502868 a4b64b6bd26b0a5091f545c9389a8dca1e0641cf
parent 502867 daffe63f1a1f313446c7f4c29e24de04f4ed1062
child 502869 e96d9b255d52bb341617eb34a6f2f8996b7a0033
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, chutten
bugs1504247, 790213, 1364957
milestone65.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 1504247 - Define a high-resolution page load time histogram r=dao,chutten The FX_PAGE_LOAD_MS histogram, implemented in Bug 790213, measures the time it takes Firefox to load a page's static content. Unfortunately, it uses only 20 buckets to cover a 10,000ms range, so resolution is quite poor. The modal bucket is 860ms wide. There is at least anecdotal evidence that increasing page load times by increments as small as 100 ms can alter user behavior, so much better resolution is required to have confidence in changes we expect to alter page load times. Also fixes Bug 1364957. Differential Revision: https://phabricator.services.mozilla.com/D11198
browser/base/content/browser.js
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5339,34 +5339,34 @@ const AccessibilityRefreshBlocker = {
     }
   },
 };
 
 var TabsProgressListener = {
   onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Collect telemetry data about tab load times.
     if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
-      let stopwatchRunning = TelemetryStopwatch.running("FX_PAGE_LOAD_MS", aBrowser);
+      let stopwatchRunning = TelemetryStopwatch.running("FX_PAGE_LOAD_MS_2", aBrowser);
 
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
           if (stopwatchRunning) {
             // Oops, we're seeing another start without having noticed the previous stop.
-            TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS", aBrowser);
+            TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS_2", aBrowser);
           }
-          TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
+          TelemetryStopwatch.start("FX_PAGE_LOAD_MS_2", aBrowser);
           Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
         } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
                    stopwatchRunning /* we won't see STATE_START events for pre-rendered tabs */) {
-          TelemetryStopwatch.finish("FX_PAGE_LOAD_MS", aBrowser);
+          TelemetryStopwatch.finish("FX_PAGE_LOAD_MS_2", aBrowser);
         }
       } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
                  aStatus == Cr.NS_BINDING_ABORTED &&
                  stopwatchRunning /* we won't see STATE_START events for pre-rendered tabs */) {
-        TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS", aBrowser);
+        TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS_2", aBrowser);
       }
     }
   },
 
   onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI, aFlags) {
     // Filter out location changes caused by anchor navigation
     // or history.push/pop/replaceState.
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -6166,21 +6166,34 @@
     "kind": "exponential",
     "high": 10000,
     "n_buckets": 20,
     "bug_numbers": [1489524],
     "description": "Firefox: Time taken to open a new browser window (ms)"
   },
   "FX_PAGE_LOAD_MS": {
     "record_in_processes": ["main", "content"],
-    "expires_in_version": "default",
-    "kind": "exponential",
-    "high": 10000,
-    "n_buckets": 20,
-    "description": "Firefox: Time taken to load a page (ms). This includes all static contents, no dynamic content. Loading of about: pages is not counted."
+    "expires_in_version": "65",
+    "kind": "exponential",
+    "high": 10000,
+    "n_buckets": 20,
+    "description": "Firefox: Time taken to load a page (ms). This includes all static contents, no dynamic content. Loading of about: pages is not counted.",
+    "bug_numbers": [790213, 1504247],
+    "alert_emails": ["tdsmith@mozilla.com"]
+  },
+  "FX_PAGE_LOAD_MS_2": {
+    "record_in_processes": ["main", "content"],
+    "expires_in_version": "never",
+    "kind": "linear",
+    "high": 10000,
+    "n_buckets": 200,
+    "description": "Firefox: Time taken to load a page (ms). This includes all static contents, no dynamic content. Loading of about: pages is not counted.",
+    "bug_numbers": [1504247],
+    "alert_emails": ["tdsmith@mozilla.com", "perfteam@mozilla.com", "product-metrics-telemetry-alerts@mozilla.com"],
+    "releaseChannelCollection": "opt-out"
   },
   "FX_SCHEDULE_PRESSURE_IDLE_SAMPLE_MS": {
     "record_in_processes": ["main"],
     "expires_in_version": "61",
     "kind": "exponential",
     "high": 10000,
     "n_buckets": 20,
     "bug_numbers": [1406414],
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -165,17 +165,16 @@
     "FONTLIST_INITFACENAMELISTS",
     "FONTLIST_INITOTHERFAMILYNAMES",
     "FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING",
     "FONT_CACHE_HIT",
     "FX_BOOKMARKS_TOOLBAR_INIT_MS",
     "FX_BROWSER_FULLSCREEN_USED",
     "FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE",
     "FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE",
-    "FX_PAGE_LOAD_MS",
     "FX_SESSION_RESTORE_NUMBER_OF_EAGER_TABS_RESTORED",
     "FX_SESSION_RESTORE_NUMBER_OF_TABS_RESTORED",
     "FX_SESSION_RESTORE_NUMBER_OF_WINDOWS_RESTORED",
     "FX_TABLETMODE_PAGE_LOAD",
     "FX_TAB_CLICK_MS",
     "FX_THUMBNAILS_BG_CAPTURE_CANVAS_DRAW_TIME_MS",
     "FX_THUMBNAILS_BG_CAPTURE_DONE_REASON_2",
     "FX_THUMBNAILS_BG_CAPTURE_PAGE_LOAD_TIME_MS",
@@ -665,17 +664,16 @@
     "FONTLIST_INITOTHERFAMILYNAMES",
     "FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING",
     "FONT_CACHE_HIT",
     "FORGET_SKIPPABLE_MAX",
     "FX_BOOKMARKS_TOOLBAR_INIT_MS",
     "FX_BROWSER_FULLSCREEN_USED",
     "FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE",
     "FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE",
-    "FX_PAGE_LOAD_MS",
     "FX_SANITIZE_CACHE",
     "FX_SANITIZE_COOKIES_2",
     "FX_SANITIZE_DOWNLOADS",
     "FX_SANITIZE_FORMDATA",
     "FX_SANITIZE_HISTORY",
     "FX_SANITIZE_OPENWINDOWS",
     "FX_SANITIZE_SESSIONS",
     "FX_SANITIZE_SITESETTINGS",
@@ -1302,17 +1300,18 @@
     "CERT_PINNING_FAILURES_BY_CA",
     "CERT_PINNING_MOZ_RESULTS_BY_HOST",
     "CERT_PINNING_MOZ_TEST_RESULTS_BY_HOST",
     "GFX_CRASH",
     "GC_REASON_2",
     "GC_MINOR_REASON",
     "GC_MINOR_REASON_LONG",
     "SSL_CT_POLICY_COMPLIANT_CONNECTIONS_BY_CA",
-    "SSL_CT_POLICY_NON_COMPLIANT_CONNECTIONS_BY_CA"
+    "SSL_CT_POLICY_NON_COMPLIANT_CONNECTIONS_BY_CA",
+    "FX_PAGE_LOAD_MS_2"
   ],
   "expiry_default": [
     "IDLE_NOTIFY_IDLE_MS",
     "CACHE_MEMORY_SEARCH_2",
     "OSFILE_WORKER_LAUNCH_MS",
     "GEOLOCATION_OSX_SOURCE_IS_MLS",
     "TRANSLATION_OPPORTUNITIES_BY_LANGUAGE",
     "FX_THUMBNAILS_BG_CAPTURE_DONE_REASON_2",
@@ -1373,17 +1372,16 @@
     "PLACES_BACKUPS_TOJSON_MS",
     "A11Y_ISIMPLEDOM_USAGE_FLAG",
     "FX_SESSION_RESTORE_MANUAL_RESTORE_DURATION_UNTIL_EAGER_TABS_RESTORED_MS",
     "PDF_VIEWER_DOCUMENT_GENERATOR",
     "PDF_VIEWER_FALLBACK_SHOWN",
     "FX_SESSION_RESTORE_ALL_FILES_CORRUPT",
     "SHOULD_AUTO_DETECT_LANGUAGE",
     "A11Y_IATABLE_USAGE_FLAG",
-    "FX_PAGE_LOAD_MS",
     "LOCALDOMSTORAGE_PRELOAD_PENDING_ON_FIRST_ACCESS",
     "DENIED_TRANSLATION_OFFERS",
     "XUL_CACHE_DISABLED",
     "PAGE_FAULTS_HARD",
     "BROWSERPROVIDER_XUL_IMPORT_BOOKMARKS",
     "PDF_VIEWER_USED",
     "NETWORK_DISK_CACHE_OPEN",
     "GEOLOCATION_WIN8_SOURCE_IS_MLS"