Bug 1280629 - Part 2: telemetry of e10 back pressure suspension rate. r=dragana
☠☠ backed out by 77273a4b047a ☠ ☠
authorJunior Hsu <juhsu@mozilla.com>
Wed, 15 Aug 2018 10:07:04 +0300
changeset 486772 64648fd6ef5ee1dece183850a31c05471fb3dabb
parent 486771 e654f2b128f6483738646728911b29fcf426b76f
child 486773 6c488a5eb81d3e2e41ba0913b2610facf6df465b
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1280629
milestone63.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 1280629 - Part 2: telemetry of e10 back pressure suspension rate. r=dragana Summary: Split this patch for data review Reviewers: dragana Reviewed By: dragana Subscribers: janerik Bug #: 1280629 Differential Revision: https://phabricator.services.mozilla.com/D2747
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/HttpChannelParent.h
toolkit/components/telemetry/Histograms.json
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -68,16 +68,17 @@ HttpChannelParent::HttpChannelParent(con
   : mLoadContext(aLoadContext)
   , mNestedFrameId(0)
   , mIPCClosed(false)
   , mPBOverride(aOverrideStatus)
   , mStatus(NS_OK)
   , mIgnoreProgress(false)
   , mSentRedirect1BeginFailed(false)
   , mReceivedRedirect2Verify(false)
+  , mHasSuspendedByBackPressure(false)
   , mPendingDiversion(false)
   , mDivertingFromChild(false)
   , mDivertedOnStartRequest(false)
   , mSuspendedForDiversion(false)
   , mSuspendAfterSynthesizeResponse(false)
   , mWillSynthesizeResponse(false)
 {
   LOG(("Creating HttpChannelParent [this=%p]\n", this));
@@ -1580,16 +1581,20 @@ HttpChannelParent::OnStopRequest(nsIRequ
 
   if (mIPCClosed ||
       !mBgParent ||
       !mBgParent->OnStopRequest(aStatusCode, timing,
                                 responseTrailer ? *responseTrailer : nsHttpHeaderArray())) {
     return NS_ERROR_UNEXPECTED;
   }
 
+  if (NeedFlowControl()) {
+    Telemetry::Accumulate(Telemetry::NETWORK_BACK_PRESSURE_SUSPENSION_RATE, mHasSuspendedByBackPressure);
+  }
+
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParent::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
@@ -1648,16 +1653,17 @@ HttpChannelParent::OnDataAvailable(nsIRe
   }
 
   if (NeedFlowControl()) {
     // We're going to run out of sending window size
     if (mSendWindowSize > 0 && mSendWindowSize <= count) {
       MOZ_ASSERT(!mSuspendedForFlowControl);
       Unused << mChannel->Suspend();
       mSuspendedForFlowControl = true;
+      mHasSuspendedByBackPressure = true;
     }
     mSendWindowSize -= count;
   }
 
   return NS_OK;
 }
 
 bool
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -314,16 +314,17 @@ private:
 
   // OnStatus is always called before OnProgress.
   // Set true in OnStatus if next OnProgress can be ignored
   // since the information can be recontructed from ODA.
   uint8_t mIgnoreProgress              : 1;
 
   uint8_t mSentRedirect1BeginFailed    : 1;
   uint8_t mReceivedRedirect2Verify     : 1;
+  uint8_t mHasSuspendedByBackPressure  : 1;
 
   // Indicates that diversion has been requested, but we could not start it
   // yet because the channel is still being opened with a synthesized response.
   uint8_t mPendingDiversion            : 1;
   // Once set, no OnStart/OnData/OnStop calls should be accepted; conversely, it
   // must be set when RecvDivertOnData/~DivertOnStop/~DivertComplete are
   // received from the child channel.
   uint8_t mDivertingFromChild          : 1;
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -1949,16 +1949,24 @@
     "record_in_processes": ["main"],
     "expires_in_version": "never",
     "alert_emails": ["necko@mozilla.com", "mnovotny@mozilla.com"],
     "bug_numbers": [1377223],
     "kind": "categorical",
     "labels": ["NotSent", "CachedContentUsed", "CachedContentNotUsed"],
     "description": "Stats for validation requests when cache won the race."
   },
+  "NETWORK_BACK_PRESSURE_SUSPENSION_RATE": {
+    "record_in_processes": ["main"],
+    "expires_in_version": "68",
+    "alert_emails": ["necko@mozilla.com", "junior@mozilla.com"],
+    "bug_numbers": [1280629],
+    "kind": "boolean",
+    "description": "Collect whether the flow control to enable e10s back pressure triggers the suspension (true) or not (false)"
+  },
   "NETWORK_HTTP_REDIRECT_TO_SCHEME" :{
     "record_in_processes": ["main"],
     "alert_emails": ["necko@mozilla.com", "seceng-telemetry@mozilla.com", "jkt@mozilla.com"],
     "bug_numbers": [1413512],
     "expires_in_version": "64",
     "kind": "categorical",
     "keyed": true,
     "description": "Count of the HTTP redirection that triggered by top-level document or by subresource, keyed by the URL scheme redirected to.",