<!--
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
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<variants name="ChromeInitiatorLocation">
  <variant name="Backward" summary="Initiated by a back navigation"/>
  <variant name="BookmarkBar" summary="Initiated from BookmarkBar"/>
  <variant name="Forward" summary="Initiated by a forward navigation"/>
  <variant name="LinkClick" summary="Initiated by a link click"/>
  <variant name="NewTabPage" summary="Initiated from NewTabPage"/>
  <variant name="OmniboxDefaultSearchEngine"
      summary="Initiated from OmniboxDefaultSearchEngine"/>
  <variant name="OmniboxDirectUrlInput"
      summary="Initiated from OmniboxDirectUrlInput"/>
  <variant name="Other" summary="Initiated from other"/>
  <variant name="Reload" summary="Initiated by a reload navigation"/>
</variants>

<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="InitiatorLocation">
  <variant name="All"
      summary="All initiator locations. No additional condition."/>
  <variant name="BookmarkBar" summary="Initiated from BookmarkBar"/>
  <variant name="LinkClick" summary="Initiated by a link click"/>
  <variant name="NewTabPage" summary="Initiated from NewTabPage"/>
  <variant name="OmniboxDefaultSearchEngine"
      summary="Initiated from OmniboxDefaultSearchEngine"/>
  <variant name="OmniboxDirectUrlInput"
      summary="Initiated from OmniboxDirectUrlInput"/>
  <variant name="Other" summary="Initiated from other"/>
</variants>

<variants name="NavigationDestinationSuffix">
  <variant name="All" summary="All navigations"/>
  <variant name="SRP" summary="Navigation to Google Search Result Page"/>
</variants>

<variants name="PrefetchDataPipeTeeStateLoadingOrSizeExceeded">
  <variant name="Loading" summary=""/>
  <variant name="SizeExceeded" 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="ChromeCustomTabs"
      summary="When preloading is triggered by CCT prefetch API."/>
  <variant name="DefaultSearchEngine"
      summary="When preloading is triggered from the default search engine
               suggest service."/>
  <variant name="EagerViewportHeuristic"
      summary="When preloading is triggered by a deterministic viewport-based
               heuristic for the 'eager' eagerness."/>
  <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="MouseHoverOnBookmarkBar"
      summary="When a mousehover event happens on a bookmark bar link to an
               HTTPS origin."/>
  <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="MouseHoverOrMouseDownOnNewTabPage"
      summary="When a mousehover or mousedown event happens on a new tab page
               linking to an HTTPS origin."/>
  <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="OmniboxSearchSuggestDefaultMatch"
      summary="When the default match in omnibox has the search prefetch or
               prerender hint."/>
  <variant name="OmniboxTouchDownPredirector"
      summary="When the preloading URL is predicted from the default search
               suggest due to the user touching down on an Omnibox Search
               suggestion."/>
  <variant name="PointerDownOnAnchor"
      summary="When a pointerdown event happens on a HTTP/HTTPS anchor."/>
  <variant name="PointerDownOnBookmarkBar"
      summary="When a pointerdown event happens on a bookmark bar link to an
               HTTPS origin."/>
  <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="PrewarmDefaultSearchEngine"
      summary="When the default search engine needs to prerender a prewarm
               page."/>
  <variant name="SpeculationRules"
      summary="When preloading is triggered by the speculation rules."/>
  <variant name="SpeculationRulesFromAutoSpeculationRules"
      summary="When preloading is triggered by speculation rules injected by
               the browser as part of the auto speculation rules feature."/>
  <variant name="SpeculationRulesFromIsolatedWorld"
      summary="When preloading is triggered by speculation rules injected
               from an isolated world (e.g., extensions or embedder's
               built-in features)."/>
  <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."/>
  <variant name="ViewportHeuristic"
      summary="When preloading is triggered by a deterministic viewport-based
               heuristic."/>
</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>

<variants name="PreloadServingMetricsActualMatchSuffix">
  <variant name="" summary="No condition"/>
  <variant name=".ForActualMatch"
      summary="Recorded if the match ended as actual match."/>
  <variant name=".ForNotActualMatch"
      summary="Recorded if the match started as potential match but ended as
               not actual match."/>
</variants>

<variants name="PreloadServingMetricsPrefix">
  <variant name="PreloadServingMetrics.ForNavigationCommitted"
      summary="Recorded when a navigation is committed. Doesn't include a
               prerender initial navigation. Metrics are about the
               navigation."/>
  <variant name="PreloadServingMetrics.ForPrerenderInitialNavigationFailed"
      summary="Recorded when a prerender initial navigation failed. Metrics
               are about the prerender initial navigation."/>
  <variant
      name="PreloadServingMetrics.ForPrerenderInitialNavigationFailed.FallbackAborted.Match0"
      summary="Recorded when a prerender initial navigation failed and is
               aborted by PrerenderURLLoaderThrottle. Metrics are about the
               prerender initial navigation and the first prefetch matching."/>
  <variant
      name="PreloadServingMetrics.ForPrerenderInitialNavigationFailed.FallbackAborted.Match1"
      summary="Recorded when a prerender initial navigation failed and is
               aborted by PrerenderURLLoaderThrottle. Metrics are about the
               prerender initial navigation and the second prefetch matching."/>
  <variant
      name="PreloadServingMetrics.ForPrerenderInitialNavigationFailed.WithMatchDurationGe10000"
      summary="Recorded when a prerender initial navigation failed and the
               first prefetch matching took duration greater than or equal to
               10000ms. Metrics are about the prerender initial navigation."/>
  <variant name="PreloadServingMetrics.ForPrerenderInitialNavigationUsed"
      summary="Recorded when a prerender activation is committed. Metrics are
               about the prerender initial navigation that is used."/>
</variants>

<variants name="PreloadServingMetricsPrerenderFallbackMatchSuffix">
  <variant name=".Match0" summary="For the first prefetch matching."/>
  <variant name=".Match1" summary="For the second prefetch matching."/>
</variants>

<variants name="UsedInstantLoad">
  <variant name="All" summary="All navigations. No additional condition."/>
  <variant name="NoInstantLoad" summary="No instant load technology was used."/>
  <variant name="Prefetch" summary="Prefetch was used."/>
  <variant name="Prefetch.WithoutPrePrefetch"
      summary="Prefetch that was not constructed from a PrePrefetch was used.
               Only recorded when `kPrefetchOffTheMainThread` is enabled."/>
  <variant name="Prefetch.WithPrePrefetch"
      summary="Prefetch that was constructed from a PrePrefetch was used.
               Only recorded when `kPrefetchOffTheMainThread` is enabled."/>
  <variant name="Prerender" summary="Prerender was used."/>
</variants>

<variants name="WithPreloadSuffix">
  <variant name="WithoutPreload"
      summary="Recorded for a navigation without preloads."/>
  <variant name="WithPrefetch"
      summary="Recorded for a navigation used prefetch."/>
  <variant name="WithPrefetch.WithoutPrePrefetch"
      summary="Recorded for a navigation used prefetch that was not
               constructed from a PrePrefetch. Only recorded when
               `kPrefetchOffTheMainThread` is enabled."/>
  <variant name="WithPrefetch.WithPrePrefetch"
      summary="Recorded for a navigation used prefetch that was constructed
               from a PrePrefetch. Only recorded when
               `kPrefetchOffTheMainThread` is enabled."/>
  <variant name="WithPrerender"
      summary="Recorded for a navigation used prerender."/>
</variants>

<histogram name="Preloading.Experimental.UpdateSpeculationCandidatesReason"
    enum="PreloadingUpdateSpeculationCandidatesReason"
    expires_after="2024-09-29">
  <owner>taiyo@chromium.org</owner>
  <owner>chrome-prerendering@google.com</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-04-13">
  <owner>isaboori@google.com</owner>
  <owner>spelchat@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>portals-team@google.com</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="2027-02-07">
  <owner>isaboori@google.com</owner>
  <owner>spelchat@chromium.org</owner>
  <owner>sreejakshetty@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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="2027-02-07">
  <owner>isaboori@google.com</owner>
  <owner>spelchat@chromium.org</owner>
  <owner>sreejakshetty@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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.Prefetch.PrefetchDataPipeTeeCloneFailed.{PrefetchDataPipeTeeStateLoadingOrSizeExceeded}"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Records how many times `PrefetchDataPipeTee::Clone()` is called when the
    method failed.

    {PrefetchDataPipeTeeStateLoadingOrSizeExceeded} indicates
    `PrefetchDataPipeTee::State` at the failure.

    It is used for investigation crbug.com/374039756.
  </summary>
  <token key="PrefetchDataPipeTeeStateLoadingOrSizeExceeded"
      variants="PrefetchDataPipeTeeStateLoadingOrSizeExceeded"/>
</histogram>

<histogram name="Preloading.Prefetch.PrefetchDataPipeTeeDtorState"
    enum="PrefetchDataPipeTeeState" expires_after="2027-01-17">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Records the `PrefetchDataPipeTee::State` at `PrefetchDataPipeTee`'s
    destructor.

    It is used for investigation crbug.com/374039756.
  </summary>
</histogram>

<histogram
    name="Preloading.Prefetch.PrefetchResponseReaderCreateRequestHandlerInvalidBody"
    units="bool" expires_after="2025-04-17">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Records `true` when `PrefetchResponseReader::CreateRequestHandler` couldn't
    get valid `body`. `false` is never recorded.

    It is used for investigation crbug.com/374039756.
  </summary>
</histogram>

<histogram name="Preloading.Prefetch.PrefetchStatus"
    enum="PrefetchProxyPrefetchStatus" expires_after="2026-12-20">
  <owner>adithyas@chromium.org</owner>
  <owner>portals-team@google.com</owner>
  <summary>
    Records the final PrefetchStatus value for a PrefetchContainer. The value is
    recorded when a prefetch fails (in the failure case), or when the
    PrefetchContainer is destroyed (in all other cases).
  </summary>
</histogram>

<histogram
    name="Preloading.Prefetch.PrePrefetch.PrePrefetchServiceThreadBlockTime"
    units="ms" expires_after="2026-10-18">
  <owner>taiyo@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Records the time spent blocking the thread on
    `PrePrefetchServiceImpl::StartPrePrefetchRequestInternal()` waiting for
    `PrePrefetchServiceCore::StartPrePrefetchRequest` to complete execution on
    its core sequence task runner.
  </summary>
</histogram>

<histogram name="Preloading.Prefetch.PrePrefetch.StartResult"
    enum="PrePrefetchStartResult" expires_after="2026-10-18">
  <owner>taiyo@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Records the outcome of starting a PrePrefetch request (i.e. whether
    `PrePrefetchContainer` is started or failed and the reason why). Recorded
    during `PrePrefetchServiceCore::StartPrePrefetchRequest()`.
  </summary>
</histogram>

<histogram name="Preloading.PrefetchBCGSwap.RelatedActiveContents"
    units="contents" expires_after="2024-06-30">
  <owner>jbroman@chromium.org</owner>
  <owner>portals-team@google.com</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>mcnee@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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="2027-01-10">
  <owner>isaboori@google.com</owner>
  <owner>spelchat@chromium.org</owner>
  <owner>sreejakshetty@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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="2027-02-07">
  <owner>isaboori@google.com</owner>
  <owner>spelchat@chromium.org</owner>
  <owner>sreejakshetty@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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="2027-02-07">
  <owner>spelchat@chromium.org</owner>
  <owner>sreejakshetty@chromium.org</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>liuwilliam@chromium.org</owner>
  <owner>chrome-brapp-loading@chromium.org</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>

<histogram
    name="PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.WithoutFiltering.{InitiatorLocation}.{NavigationDestinationSuffix}.{UsedInstantLoad}"
    units="ms" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    FirstContentfulPaint without foreground filtering.

    Recorded when {InitiatorLocation}, {NavigationDestinationSuffix}, and
    {UsedInstantLoad}.
  </summary>
  <token key="InitiatorLocation" variants="InitiatorLocation"/>
  <token key="NavigationDestinationSuffix"
      variants="NavigationDestinationSuffix"/>
  <token key="UsedInstantLoad" variants="UsedInstantLoad"/>
</histogram>

<histogram
    name="PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.{InitiatorLocation}.{NavigationDestinationSuffix}.{UsedInstantLoad}"
    units="ms" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    FirstContentfulPaint.

    Recorded when {InitiatorLocation}, {NavigationDestinationSuffix}, and
    {UsedInstantLoad}.
  </summary>
  <token key="InitiatorLocation" variants="InitiatorLocation"/>
  <token key="NavigationDestinationSuffix"
      variants="NavigationDestinationSuffix"/>
  <token key="UsedInstantLoad" variants="UsedInstantLoad"/>
</histogram>

<histogram
    name="PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.{WithPreloadSuffix}"
    units="ms" expires_after="2027-01-31">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    FirstContentfulPaint.

    Recorded when {WithPreloadSuffix}.

    Note: This is going to be obsolete. Use
    PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.All.All.{{UsedInstantLoad}}
    instead.
  </summary>
  <token key="WithPreloadSuffix" variants="WithPreloadSuffix"/>
</histogram>

<histogram
    name="PreloadServingMetrics.{ChromeInitiatorLocation}.{NavigationDestinationSuffix}"
    enum="UsedInstantLoad" expires_after="2027-02-07">
  <owner>robertlin@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Recorded when navigation finishes. Records the instant load technology used
    for the navigation. Evaluated for {ChromeInitiatorLocation} and for
    {NavigationDestinationSuffix}.
  </summary>
  <token key="ChromeInitiatorLocation" variants="ChromeInitiatorLocation"/>
  <token key="NavigationDestinationSuffix"
      variants="NavigationDestinationSuffix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ActualMatchThen.TimeFromPrefetchContainerAddedToMatchStart"
    units="ms" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The duration from when the used prefetch container is added to the start of
    prefetch matching.

    Recorded when {PreloadServingMetricsPrefix} and the prefetch matching ended
    as actual match.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.Count"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The number of prefetches that are matched with a navigation.

    Recorded when {PreloadServingMetricsPrefix}.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaop"
    units="bool" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Whether a prefetch ahead of prerender existed at the timing of prefetch
    matching.

    Recorded when {PreloadServingMetricsPrefix}.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.PotentialCandidateCollectResultAndServableStateAndMatcherAction"
    units="code" expires_after="2027-01-17">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The combination of `PrefetchPotentialCandidateCollectResult`,
    `PrefetchServableState`, and `PrefetchMatchResolverAction`. See
    `GetCodeOfPotentialCandidateCollectResultAndServableStateAndMatcherAction()`
    for the details of the value.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.PotentialCandidateServingResultAndServableStateAndMatcherAction"
    units="code" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The combination of `PrefetchPotentialCandidateServingResult`,
    `PrefetchServableState`, and `PrefetchMatchResolverAction`.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.PrefetchStatus"
    enum="PrefetchStatus" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The status of the prefetch at the timing of prefetch matching.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.QueueIndexPlus1"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The index of the prefetch in the queue, plus one. 0 if the prefetch is not
    in the queue at the timing of prefetch matching.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.QueueSize"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The size of the prefetch queue at the timing of prefetch matching.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.ExistsPaopThen.ServableStateAndMatcherAction"
    units="code" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The servable state of the prefetch and the PrefetchMatchResolver's action
    taken.

    Recorded when {PreloadServingMetricsPrefix} and a prefetch ahead of
    prerender exisited.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.IsPotentialMatch"
    units="bool" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Whether the first prefetch matching for a navigation started as potential
    match.

    Recorded when {PreloadServingMetricsPrefix}.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.IsPotentialMatch.WithAheadOfPrerender"
    units="bool" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Whether the first prefetch matching for a navigation started as potential
    match with prefetch ahead of prerender.

    Recorded when {PreloadServingMetricsPrefix} and the navigation is prerender
    initial navigation.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.IsActualMatch"
    units="bool" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Whether the first prefetch matching for a navigation ended as actual match.

    Recorded when {PreloadServingMetricsPrefix}.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.MatchDuration{PreloadServingMetricsActualMatchSuffix}"
    units="ms" expires_after="2027-01-31">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    Duration for the first prefetch matching for a navigation.

    Recorded when {PreloadServingMetricsPrefix}, the first prefetch matching
    started as potential match, and {PreloadServingMetricsActualMatchSuffix}.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
  <token key="PreloadServingMetricsActualMatchSuffix"
      variants="PreloadServingMetricsActualMatchSuffix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.NumberOfInitialCandidates"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The number of initial candidates of the first prefetch matching for a
    navigation.

    Recorded when {PreloadServingMetricsPrefix} and the first prefetch matching
    started as a potential match.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.NumberOfInitialCandidatesBlockUntilHead"
    units="count" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    The number of blocking initial candidates of the first prefetch matching for
    a navigation.

    Recorded when {PreloadServingMetricsPrefix} and the first prefetch matching
    started as a potential match.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.PotentialCandidateServingResult.Last"
    enum="PrefetchPotentialCandidateServingResult" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    `PrefetchPotentialCandidateServingResult` of the last candidate in the first
    prefetch matching.

    Recorded when {PreloadServingMetricsPrefix} and the first prefetch matching
    started as a potential match.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

<histogram
    name="{PreloadServingMetricsPrefix}.PrefetchMatchMetrics.PotentialMatchThen.WithAheadOfPrerender.PotentialCandidateServingResult"
    enum="PrefetchPotentialCandidateServingResult" expires_after="2027-02-07">
  <owner>kenoss@chromium.org</owner>
  <owner>chrome-prerendering@google.com</owner>
  <summary>
    `PrefetchPotentialCandidateServingResult` of prefetch ahead of prerender in
    the first prefetch matching.

    Recorded when {PreloadServingMetricsPrefix}, the navigation is prerender
    initial navigation, and the prefetch ahead of prerender is potential match.
  </summary>
  <token key="PreloadServingMetricsPrefix"
      variants="PreloadServingMetricsPrefix"/>
</histogram>

</histograms>

</histogram-configuration>
