bug 1497252 - Add DNS_TRR_FIRST2, with an added category r=dragana
authorDaniel Stenberg <daniel@haxx.se>
Wed, 17 Oct 2018 06:34:08 +0000
changeset 500046 8d8ed5f447d03c13e0503c6fa4d113116817fd21
parent 500045 8ea8fc9bc95bd0ae8d61bd74c1eecab54d645902
child 500047 a4b43a47589a481f19fd60184881ed5d8caddd73
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1497252
milestone64.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 1497252 - Add DNS_TRR_FIRST2, with an added category r=dragana How often is a successful (native) resolve delayed by a preceeding TRR failure. (Replaces DNS_TRR_FIRST) MozReview-Commit-ID: Da8oH53CZTs Differential Revision: https://phabricator.services.mozilla.com/D8060
netwerk/dns/nsHostResolver.cpp
toolkit/components/telemetry/Histograms.json
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -510,20 +510,27 @@ AddrHostRecord::ResolveComplete()
                               ((mNativeSuccess ? Telemetry::LABELS_DNS_TRR_COMPARE::NativeWorked :
                                 (mTRRSuccess ? Telemetry::LABELS_DNS_TRR_COMPARE::TRRWorked:
                                  Telemetry::LABELS_DNS_TRR_COMPARE::BothFailed))));
     } else if (mResolverMode == MODE_TRRFIRST) {
         if(flags & nsIDNSService::RESOLVE_DISABLE_TRR) {
             // TRR is disabled on request, which is a next-level back-off method.
             Telemetry::Accumulate(Telemetry::DNS_TRR_DISABLED, mNativeSuccess);
         } else {
-            AccumulateCategorical(mTRRSuccess?
-                                  Telemetry::LABELS_DNS_TRR_FIRST::TRRWorked :
-                                  ((mNativeSuccess ? Telemetry::LABELS_DNS_TRR_FIRST::NativeFallback :
-                                    Telemetry::LABELS_DNS_TRR_FIRST::BothFailed)));
+            if (mTRRSuccess) {
+                AccumulateCategorical(Telemetry::LABELS_DNS_TRR_FIRST2::TRR);
+            } else if(mNativeSuccess) {
+                if (mTRRUsed) {
+                    AccumulateCategorical(Telemetry::LABELS_DNS_TRR_FIRST2::NativeAfterTRR);
+                } else {
+                    AccumulateCategorical(Telemetry::LABELS_DNS_TRR_FIRST2::Native);
+                }
+            } else {
+                AccumulateCategorical(Telemetry::LABELS_DNS_TRR_FIRST2::BothFailed);
+            }
         }
     }
 
     switch(mResolverMode) {
     case MODE_NATIVEONLY:
     case MODE_TRROFF:
         AccumulateCategorical(Telemetry::LABELS_DNS_LOOKUP_ALGORITHM::nativeOnly);
         break;
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -3385,24 +3385,24 @@
     "record_in_processes": ["main"],
     "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"],
     "expires_in_version": "never",
     "kind": "categorical",
     "labels": ["BothWorked", "NativeWorked", "TRRWorked", "BothFailed"],
     "bug_numbers": [1460589],
     "description": "DNS: success distribution when both native and TRR were used"
   },
-  "DNS_TRR_FIRST": {
+  "DNS_TRR_FIRST2": {
     "record_in_processes": ["main"],
     "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"],
     "expires_in_version": "never",
     "kind": "categorical",
-    "labels": ["TRRWorked", "NativeFallback", "BothFailed"],
-    "bug_numbers": [1472659],
-    "description": "TRR-first mode distribution. 0=Worked, 1=fell back to native, 2=both failed"
+    "labels": ["TRR", "NativeAfterTRR", "Native", "BothFailed"],
+    "bug_numbers": [1497252],
+    "description": "TRR-first mode distribution. 0=Worked, 1=fell back fine after TRR fail, 2=native worked, 3=both failed"
   },
   "DNS_TRR_DISABLED": {
     "record_in_processes": ["main"],
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "Resolve success rate when in TRR-first and called TRR-disabled (fall-back mode)",
     "bug_numbers": [1472659],
     "alert_emails": ["necko@mozilla.com", "dstenberg@mozilla.com"]