<!--
Copyright 2022 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 histograms owned
by the Performance Manager team along with a detailed description for
each histogram.
-->

<histogram-configuration>

<histograms>

<histogram name="PerformanceManager.Experimental.AccessibilityModeFlag"
    enum="AccessibilityModeFlagEnum" expires_after="2024-02-25">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Whether individual accessibility mode flags are set. Recorded with every UMA
    report to attempt to slice other metrics based on which a11y flags are set.
  </summary>
</histogram>

<histogram name="PerformanceManager.Experimental.HasAccessibilityModeFlag"
    enum="Boolean" expires_after="2024-02-25">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Whether any accessibility mode flags are set. Recorded with every UMA report
    to attempt to slice other metrics based on whether a11y is active.
  </summary>
</histogram>

<histogram
    name="PerformanceManager.PerformanceInterventions.CPU.DurationOverThreshold"
    units="seconds" expires_after="2024-01-01">
  <owner>agale@chromium.org</owner>
  <owner>joenotcharles@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded when a device drops back below the CPU threshold, this histogram
    represents the total time that the device was above the threshold.
  </summary>
</histogram>

<histogram
    name="PerformanceManager.PerformanceInterventions.CPU.TotalBackgroundCPU.{Timing}"
    units="%" expires_after="2024-01-01">
  <owner>agale@chromium.org</owner>
  <owner>joenotcharles@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded when the CPU threshold is reached, this histogram represents the
    percent of CPU capacity being used by background tabs.
  </summary>
  <token key="Timing">
    <variant name="Delayed"/>
    <variant name="Immediate"/>
  </token>
</histogram>

<histogram name="PerformanceManager.SiteDB.DatabaseInit"
    enum="LocalSiteCharacteristicsDBInitStatus" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The result of opening the Local Site Characteristics database. Recorded at
    startup when the database gets opened. If the result is not Success,
    PerformanceManager.SiteDB.DatabaseInitAfterRepair may be logged as well.
  </summary>
</histogram>

<histogram name="PerformanceManager.SiteDB.DatabaseInitAfterDelete"
    enum="LocalSiteCharacteristicsDBInitStatus" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The result of opening the Local Site Characteristics database after deleting
    it after a failed repair attempt. Recorded at startup when the database gets
    opened, if the initial open and repair attempts failed.
  </summary>
</histogram>

<histogram name="PerformanceManager.SiteDB.DatabaseInitAfterRepair"
    enum="LocalSiteCharacteristicsDBInitStatus" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The result of opening the Local Site Characteristics database after a repair
    attempt. Recorded at startup when the database gets opened, if the initial
    open attempt failed. If the result is not Success,
    PerformanceManager.SiteDB.DatabaseInitAfterDelete may be logged as well.
  </summary>
</histogram>

<histogram name="PerformanceManager.SiteDB.DatabaseRepair"
    enum="BooleanSuccess" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The result of trying to repair the Local Site Characteristics database after
    a failed open. Recorded at startup when the database gets opened, if the
    initial open attempt failed.
  </summary>
</histogram>

<histogram
    name="PerformanceManager.SiteDB.ObservationTimeBeforeFirstUse.{Feature}"
    units="ms" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The cumulative observation time before the {Feature} feature tracked in the
    Local Site Characteristics database gets used. Reported the first time a
    site is observed to use the feature.
  </summary>
  <token key="Feature">
    <variant name="AudioUsageInBackground"/>
    <variant name="FaviconUpdateInBackground"/>
    <variant name="TitleUpdateInBackground"/>
  </token>
</histogram>

<histogram name="PerformanceManager.SiteDB.OnDiskSize" units="KB"
    expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The size of the Local Site Characteristics database on disk. Recorded at
    startup when the database gets opened, if it already existed from a previous
    run.
  </summary>
</histogram>

<histogram name="PerformanceManager.SiteDB.ReadHasCompletedBeforeQuery"
    enum="Boolean" expires_after="2023-12-28">
  <owner>joenotcharles@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Boolean indicating if the read operation from the Local Site Characteristics
    database has completed when we query for the characteristics of a site.
    Reported every time the database is queried.
  </summary>
</histogram>

<histogram name="PerformanceManager.TabRevisitTracker.TimeToClose2"
    units="seconds" expires_after="2024-08-09">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Logged everytime a background tab is closed. Records the time in seconds
    that the tab has spent in the background since it was last active.
  </summary>
</histogram>

<histogram name="PerformanceManager.TabRevisitTracker.TimeToRevisit2"
    units="seconds" expires_after="2024-08-09">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Logged everytime a background tab is revisited. Records the time in seconds
    that the tab has spent in the background since it was last active.
  </summary>
</histogram>

<histogram name="PerformanceManager.UserTuning.BatterySaverModeEnabledPercent"
    units="%" expires_after="2024-03-03">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded every UMA upload, this histogram represents the percentage of the
    interval since the last upload that was spent with Battery Saver enabled.
  </summary>
</histogram>

<histogram name="PerformanceManager.UserTuning.EfficiencyMode"
    enum="EfficiencyMode" expires_after="2024-03-17">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Logged on each UMA upload to represent which user-controllable Efficiency
    Mode setting the browser is in during the reported window. If the mode was
    changed between uploads, MIXED will be reported for that interval.

    This histogram is used internally to filter other histograms by efficiency
    mode.
  </summary>
</histogram>

<histogram name="PerformanceManager.UserTuning.MemorySaverModeEnabledPercent"
    units="%" expires_after="2024-03-03">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded every UMA upload, this histogram represents the percentage of the
    interval since the last upload that was spent with Memory Saver enabled.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
