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,liuche
authorMike Conley <mconley@mozilla.com>
Fri, 28 Oct 2016 11:48:24 -0400
changeset 347436 71ddd5bf19ecea894ab97d175b12add5cf00c68d
parent 347435 86966ebee06588c60d3da631ac569ce935e1b7a1
child 347437 64001171c0c73e6779e8eb4904022ac4c402ac0e
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, liuche
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,liuche 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
@@ -10442,10 +10442,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"
   }
 }