Bug 1313686 - Add opt-out Telemetry probe to see how long it takes for TabChild::RecvSetDocShellIsActive to paint a tab. data-review=liuche, r?billm draft
authorMike Conley <mconley@mozilla.com>
Fri, 28 Oct 2016 11:48:24 -0400
changeset 432806 7360aab2d27c49e4be5f40932995ed0471fbcb2e
parent 432738 3bfde35a0d18a643485ffd5073f3bc6a79e0ae48
child 535759 40cfb9d3069001cdc2ce7ce38c582d930a54a8ca
push id34430
push usermconley@mozilla.com
push dateWed, 02 Nov 2016 20:46:09 +0000
reviewersbillm
bugs1313686
milestone52.0a1
Bug 1313686 - Add opt-out Telemetry probe to see how long it takes for TabChild::RecvSetDocShellIsActive to paint a tab. data-review=liuche, r?billm MozReview-Commit-ID: 5B588cs3cJ8
dom/ipc/TabChild.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2444,16 +2444,17 @@ TabChild::RecvSetDocShellIsActive(const 
     // returns null if no content viewer exists yet.
     if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
       if (nsIFrame* root = presShell->FrameConstructor()->GetRootFrame()) {
         FrameLayerBuilder::InvalidateAllLayersForFrame(
           nsLayoutUtils::GetDisplayRootFrame(root));
         root->SchedulePaint();
       }
 
+      Telemetry::AutoTimer<Telemetry::TABCHILD_PAINT_TIME> timer;
       // If we need to repaint, let's do that right away. No sense waiting until
       // we get back to the event loop again. We suppress the display port so that
       // we only paint what's visible. This ensures that the tab we're switching
       // to paints as quickly as possible.
       APZCCallbackHelper::SuppressDisplayport(true, presShell);
       if (nsContentUtils::IsSafeToRunScript()) {
         WebWidget()->PaintNowIfNeeded();
       } else {
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -10409,10 +10409,20 @@
   "HANDLE_BEFOREUNLOAD_MS": {
     "alert_emails": ["kchen@mozilla.com"],
     "expires_in_version": "55",
     "kind": "exponential",
     "high": 10000,
     "n_buckets": 50,
     "bug_numbers": [1301346],
     "description": "The time spent handling beforeunload event in milliseconds. It measures all documents and subframes separately. If there are multiple handlers for the unload event in a document, this will record a single value across all handlers in the document."
+  },
+  "TABCHILD_PAINT_TIME": {
+    "alert_emails": ["mconley@mozilla.com"],
+    "bug_numbers": [1313686],
+    "expires_in_version": "56",
+    "kind": "exponential",
+    "high": 1000,
+    "n_buckets": 50,
+    "description": "Time spent painting the contents of a remote browser (ms).",
+    "releaseChannelCollection": "opt-out"
   }
 }