chromium/tools/metrics/histograms/metadata/preloading/histograms.xml

<!--
Copyright 2023 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.

This file is used to generate a comprehensive list of Prefetch histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
[email protected].
-->

<histogram-configuration>

<histograms>

<variants name="ExperimentalPreloadingPrediction">
  <variant name="OnPointerHoverWithMotionEstimator"
      summary="Predictor based on pointer hover, except if the pointer
               velocity and acceleration suggest it will leave soon. The
               output of this predictor is mouse velocity instead of a
               logit/probability."/>
  <variant name="OnPreloadingHeuristicsMLModel"
      summary="The estimated probability that a user will click on a link
               that is calculated by preloading heuristic ML model."/>
</variants>

<variants name="GroundTruth">
  <variant name="Negative" summary=""/>
  <variant name="Positive" summary=""/>
</variants>

<variants name="PreloadingPredictor">
  <variant name="BackButtonHover"
      summary="When the user hovers their mouse over the back button."/>
  <variant name="BackGestureNavigation"
      summary="When overscroll that could trigger a back navigation starts."/>
  <variant name="DefaultSearchEngine"
      summary="When preloading is triggered from the default search engine
               suggest service."/>
  <variant name="LinkRel"
      summary="When preloading is triggered by the 'rel' keyword embedded in
               the link element."/>
  <variant name="MouseBackButton"
      summary="When a mouse down of a mouse back button is seen."/>
  <variant name="MouseHoverOnNewTabPage"
      summary="When preloading is triggered by mouse hover NewTabPage on
               Desktop."/>
  <variant name="MouseHoverOrMouseDownOnBookmarkBar"
      summary="When preloading is triggered by mouse hover bookmarkbar or
               mouse down bookmark bar."/>
  <variant name="OmniboxDirectURLInput"
      summary="When preloading is triggered from the Omnibox DUI."/>
  <variant name="OmniboxMousePredictor"
      summary="When preloading is triggered from the default search suggest
               due to mousedown on a Omnibox Search suggestion."/>
  <variant name="OmniboxSearchPredictor"
      summary="When preloading is triggered from the default search suggest
               due to change in Omnibox selection."/>
  <variant name="PointerDownOnAnchor"
      summary="When a pointerdown event happens on a HTTP/HTTPS anchor."/>
  <variant name="PointerDownOnNewTabPage"
      summary="When preloading is triggered by mouse down NewTabPage on
               Desktop."/>
  <variant name="PreloadingHeuristicsMLModel"
      summary="When preloading is triggered by an ML model prediction."/>
  <variant name="SpeculationRules"
      summary="When preloading is triggered by the speculation rules."/>
  <variant name="TouchOnNewTabPage"
      summary="When preloading is triggered by Touch events on Android."/>
  <variant name="Unspecified" summary=""/>
  <variant name="UrlPointerDownOnAnchor"
      summary="When preloading is triggered by OnPointerDown."/>
  <variant name="UrlPointerHoverOnAnchor"
      summary="When preloading is triggered by OnPointerHover."/>
</variants>

<variants name="PreloadingType">
  <variant name="NoStatePrefetch" summary=""/>
  <variant name="Preconnect" summary=""/>
  <variant name="Prefetch" summary=""/>
  <variant name="Prerender" summary=""/>
  <variant name="Unspecified" summary=""/>
</variants>

<histogram name="Preloading.AnchorElementPreloader.PreloadingTriggered"
    enum="AnchorElementPreloaderType" expires_after="2024-09-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Logged once for each preconnection request sent by renderer to the browser
    when intercepting pointerdown events. Note that the browser may ignore some
    of those requests (like duplicate requests or requests made by users that
    disabled preloading via the UI) and will not always forward the preconnect
    request to the network service. Associated with the Source ID of the page
    triggering the preconnection.
  </summary>
</histogram>

<histogram name="Preloading.Experimental.UpdateSpeculationCandidatesReason"
    enum="PreloadingUpdateSpeculationCandidatesReason"
    expires_after="2024-09-29">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This metric counts the number of the update of speculation rules preloading,
    classified by the reason for updates. Currently, this is introduced to
    measure the overall impact of BFCache retrigger(crbug.com/1449163). This
    metric is recorded when UpdateSpeculationCandidates is called on
    DocumentSpeculationRules.
  </summary>
</histogram>

<histogram
    name="Preloading.Experimental.{ExperimentalPreloadingPrediction}.{GroundTruth}"
    units="param" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The output of many predictors is a logit score. To use this score for binary
    classification, we compare it to a threshold. If the score is above the
    threshold, we classify the instance as positive; otherwise, we classify it
    as negative. Threshold choice affects classifier precision and recall. There
    is a trade-off between precision and recall. If we set the threshold too
    low, we will have high precision but low recall. If we set the threshold too
    high, we will have high recall but low precision. To choose the best
    threshold, we can use ROC curves, precision-recall curves, or
    logit-precision and logit-recall curves. `ExperimentalPreloadingPrediction`
    helps us collect the UMA data required to achieve this.
  </summary>
  <token key="ExperimentalPreloadingPrediction"
      variants="ExperimentalPreloadingPrediction"/>
  <token key="GroundTruth" variants="GroundTruth"/>
</histogram>

<histogram name="Preloading.Predictor.{PreloadingPredictor}.Precision"
    enum="PredictorConfusionMatrix" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    After the user starts a new navigation, the outcome of the
    {PreloadingPredictor} preloading predictor is recorded as a true positive or
    a false positive. These statistics are used to compute precision of the
    preloading predictor. The statistics about negative cases are not required
    to compute the precision and are not recorded here.
  </summary>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

<histogram name="Preloading.Predictor.{PreloadingPredictor}.Recall"
    enum="PredictorConfusionMatrix" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    After the user starts a new navigation, the outcome of any eligible
    {PreloadingPredictor} preloading predictor is recorded as a true positive or
    a false negative. These statistics are used to compute recall of the
    preloading predictor. The statistics about false positive and true negative
    cases are not required to compute the recall and are not recorded here.
  </summary>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

<histogram name="Preloading.PrefetchBCGSwap.RelatedActiveContents"
    units="contents" expires_after="2024-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of active contents in the same BrowsingInstance as a
    frame which is, or would be, swapped to a new one due to use of a cross-site
    prefetch, when this determination is being made on navigation. The
    proportion of these which is greater than 1 is a rough upper bound for the
    cases where this might be observable due to an opener relationship.
  </summary>
</histogram>

<histogram
    name="Preloading.PrerenderBackNavigationEligibility.{PreloadingPredictor}"
    enum="PrerenderBackNavigationEligibility" expires_after="2025-10-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether prerendering a back navigation is possible at the time of
    the prediction of a back navigation by {PreloadingPredictor}.
  </summary>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

<histogram
    name="Preloading.{PreloadingType}.Attempt.{PreloadingPredictor}.Precision"
    enum="PredictorConfusionMatrix" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    After the user starts a new navigation, the outcome of the preloading
    attempt of type {PreloadingType} that is triggered by {PreloadingPredictor}
    is recorded as a true positive or a false positive. These statistics are
    used to compute precision of the preloading attempt. The statistics about
    negative cases are not required to compute the precision and are not
    recorded here.
  </summary>
  <token key="PreloadingType" variants="PreloadingType"/>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

<histogram
    name="Preloading.{PreloadingType}.Attempt.{PreloadingPredictor}.Recall"
    enum="PredictorConfusionMatrix" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    After the user starts a new navigation, the outcome of any eligible
    preloading attempt of type {PreloadingType} that is triggered by
    {PreloadingPredictor} or the lack of an attempt by an eligible predictor is
    recorded as a true positive or a false negative. These statistics are used
    to compute recall of the preloading attempt. The statistics about false
    positive and true negative cases are not required to compute the recall and
    are not recorded here.
  </summary>
  <token key="PreloadingType" variants="PreloadingType"/>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

<histogram
    name="Preloading.{PreloadingType}.Attempt.{PreloadingPredictor}.TriggeringOutcome"
    enum="PreloadingTriggeringOutcome" expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the triggering outcome of a preloading attempt of type
    {PreloadingType} and triggered by {PreloadingPredictor} that happened on the
    previous page load at the time a new navigation is started.
  </summary>
  <token key="PreloadingType" variants="PreloadingType"/>
  <token key="PreloadingPredictor" variants="PreloadingPredictor"/>
</histogram>

</histograms>

</histogram-configuration>