<!--
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>

<variants name="CoreType">
  <variant name="Balanced"/>
  <variant name="Efficiency"/>
  <variant name="Performance"/>
</variants>

<histogram name="CPU.Experimental.CpuEstimationTaskMigrated" enum="Boolean"
    expires_after="2025-03-10">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    True if the CPU estimation task was running on a different CPU at the end of
    the assembly loop than it was at the beginning.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only.
  </summary>
</histogram>

<histogram name="CPU.Experimental.CpuEstimationTaskQueuedTime.{CoreType}"
    units="microseconds" expires_after="2025-07-13">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The time in microseconds during which the CPU estimation task was queued
    before running.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only. Reported only on devices using the high resolution clock.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="CPU.Experimental.CpuEstimationTaskThreadTime.{CoreType}"
    units="microseconds" expires_after="2025-05-11">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The thread time in microseconds it took to fully execute the CPU estimation
    task.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only. Reported only on devices using the high resolution clock.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="CPU.Experimental.CpuEstimationTaskTotalTime.{CoreType}"
    units="microseconds" expires_after="2025-05-11">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The time in microseconds it took to fully execute the CPU estimation task,
    that is its queued time + the wall time elapsed before the task finished.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only. Reported only on devices using the high resolution clock.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="CPU.Experimental.CpuEstimationTaskWallTime.{CoreType}"
    units="microseconds" expires_after="2025-05-11">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The wall time in microseconds it took to fully execute the CPU estimation
    task.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only. Reported only on devices using the high resolution clock.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="CPU.Experimental.CpuEstimationThreadTimePercent.{CoreType}"
    units="%" expires_after="2027-02-07">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The ratio of thread time vs wall time of the CPU estimation task's
    &quot;running&quot; portion, i.e. the thread time of the assembly loop
    divided by its wall time.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram
    name="CPU.Experimental.EstimatedFrequencyAsPercentOfLimit.{CoreType}"
    units="%" expires_after="2027-02-14">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The CPU frequency as a percentage of the estimated current frequency (see
    base::EstimateCpuFrequency) over the max frequency of the fastest CPU, as
    reported by base::GetCpuMhzLimit.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="CPU.Experimental.EstimatedFrequencyAsPercentOfMax.{CoreType}"
    units="%" expires_after="2027-02-07">
  <owner>anthonyvd@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The CPU frequency as a percentage of the estimated current frequency (see
    base::EstimateCpuFrequency) over the max frequency of the fastest CPU, as
    reported by base::GetCpuMaxMhz.

    Recorded when the CPU estimation task runs (every 5 minutes). Windows x86
    only.
  </summary>
  <token key="CoreType" variants="CoreType"/>
</histogram>

<histogram name="PerformanceManager.Discarding.DecisionResult{Trigger}"
    enum="CanDiscardResult" expires_after="2027-01-21">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded every time the DiscardEligibilityPolicy evaluates a tab for
    discarding. Tracks whether the tab was Eligible, Protected (blocked by
    policy), or Disallowed.

    This metric is recorded for all decisions, and broken down by the {Trigger}
    reason.
  </summary>
  <token key="Trigger">
    <variant name="" summary="All triggers"/>
    <variant name=".External" summary="Triggered by external request"/>
    <variant name=".Frozen" summary="Triggered by frozen tab growing memory"/>
    <variant name=".Proactive" summary="Triggered proactively"/>
    <variant name=".Suggested" summary="Triggered by suggestion"/>
    <variant name=".Urgent" summary="Triggered by urgent memory pressure"/>
  </token>
</histogram>

<histogram name="PerformanceManager.Discarding.HadFormInteraction"
    enum="Boolean" expires_after="2027-01-21">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded at the moment a discard decision is made. This is recorded at the
    same time as PerformanceManager.Discarding.DecisionResult. Indicates if the
    tab had recorded form interactions.
  </summary>
</histogram>

<histogram name="PerformanceManager.Discarding.HadUserEdits" enum="Boolean"
    expires_after="2027-01-21">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded at the moment a discard decision is made. This is recorded at the
    same time as PerformanceManager.Discarding.DecisionResult. Indicates if the
    tab had recorded user edits (typing).
  </summary>
</histogram>

<histogram name="PerformanceManager.Discarding.ProtectionReason"
    enum="CannotDiscardReason" expires_after="2027-01-21">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded when a tab is marked as 'Protected' during a discard evaluation.
    This is recorded at the same time as
    PerformanceManager.Discarding.DecisionResult. Logs the specific reason
    (e.g., Audio, Form Interaction, Pinned) that prevented the discard.
  </summary>
</histogram>

<histogram name="PerformanceManager.Discarding.TimeHiddenAtDecision" units="ms"
    expires_after="2027-01-21">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded at the moment a discard decision is made. This is recorded at the
    same time as PerformanceManager.Discarding.DecisionResult. Measures how long
    the tab has been hidden (in background). Short durations here correlate with
    high user regret.
  </summary>
</histogram>

<histogram name="PerformanceManager.DiskStats.UserDataDirFreeSpaceMb"
    units="MB" expires_after="2025-08-24">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The amount of available space in megabytes on the disk that hosts the
    current user data directory as reported by
    SysInfo::AmountOfFreeDiskSpace(user_data_dir). Warning: this histogram was
    expired from 2025-02-16 to 2025-03-20; data may be missing.
  </summary>
</histogram>

<histogram name="PerformanceManager.DiskStats.UserDataDirFreeSpacePercent"
    units="%" expires_after="2027-01-17">
  <owner>anthonyvd@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The percentage of available space on the disk that hosts the current user
    data directory as reported by SysInfo::AmountOfFreeDiskSpace(user_data_dir)
    / capacity.
  </summary>
</histogram>

<histogram name="PerformanceManager.Experimental.AccessibilityModeFlag"
    enum="AccessibilityModeFlagEnum" expires_after="2027-02-07">
  <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="2027-02-07">
  <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.InputScenarioChanges{InputScenario}"
    enum="InputScenarioUpdateReason" expires_after="2026-12-16">
  <owner>kraskevich@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Logged whenever the Performance Manager input scenario changes away from
    {InputScenario}, with the reason for the change.
  </summary>
<!-- LINT.IfChange(InputScenarioSuffix) -->

  <token key="InputScenario">
    <variant name="" summary="all scenarios"/>
    <variant name=".NoInput" summary="InputScenario::kNoInput"/>
    <variant name=".Scroll" summary="InputScenario::kScroll"/>
    <variant name=".Tap" summary="InputScenario::kTap"/>
    <variant name=".Typing" summary="InputScenario::kTyping"/>
  </token>
<!-- LINT.ThenChange(/components/performance_manager/decorators/frame_input_state_decorator.cc:InputScenarioSuffix) -->

</histogram>

<histogram
    name="PerformanceManager.RegistryStats.FrontEndHeapDebugOptionsOutcome"
    enum="FrontEndHeapDebugOptionsOutcome" expires_after="2026-06-07">
  <owner>fdoray@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The outcome of attempting to read the value of the HKEY_LOCAL_MACHINE :
    Software\Microsoft\Windows NT\CurrentVersion\Image File :
    FrontEndHeapDebugOptions registry key. Emitted when UMA requests information
    about the current session (see
    metrics::MetricsProvider::ProvideCurrentSessionData).
  </summary>
</histogram>

<histogram
    name="PerformanceManager.RegistryStats.FrontEndHeapDebugOptionsValue"
    units="bitfield" expires_after="2025-09-30">
  <owner>fdoray@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The value of the HKEY_LOCAL_MACHINE : Software\Microsoft\Windows
    NT\CurrentVersion\Image File : FrontEndHeapDebugOptions registry key.
    Emitted every time kSuccess is reported to
    PerformanceManager.RegistryStats.FrontEndHeapDebugOptionsOutcome.
  </summary>
</histogram>

<histogram name="PerformanceManager.ResourceQueryTime.{Function}"
    units="microseconds" expires_after="2027-01-03">
  <owner>joenotcharles@google.com</owner>
  <owner>olivierli@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    The time it takes for a single Resource Attribution query to return results.
    This slice of the metric covers the {Function} function.
  </summary>
  <token key="Function">
    <variant name="CPUMeasurementMonitor"
        summary="CPUMeasurementMonitor::UpdateAndGetCPUMeasurements"/>
    <variant name="MemoryMeasurementProvider"
        summary="MemoryMeasurementProvider::OnMemorySummary"/>
    <variant name="OnResultsReceived"
        summary="QueryScheduler::OnResultsReceived"/>
    <variant name="RequestResults" summary="QueryScheduler::RequestResults"/>
  </token>
</histogram>

<histogram name="PerformanceManager.TabRevisitTracker.TimeToClose2"
    units="seconds" expires_after="2025-02-16">
  <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="2025-04-20">
  <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.TransientKeepAlive.Result"
    enum="TransientKeepAliveResult" expires_after="2027-01-10">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded when a renderer process's transient keep-alive is resolved. This
    tracks the final state of the keep-alive attempt, corresponding to the
    TransientKeepAliveResult enum (e.g., successful reuse, eviction, or
    timeout).
  </summary>
</histogram>

<histogram name="PerformanceManager.TransientKeepAlive.TimeToReuse" units="ms"
    expires_after="2027-01-10">
  <owner>aattar@google.com</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Recorded only when a process kept alive by the TransientKeepAlivePolicy was
    successfully reused (i.e., when TransientKeepAliveResult::kReused is
    recorded in the .Result histogram). Measures the time delta from when the
    process became empty (and the keep-alive timer started) to when it was
    reused for a new navigation.
  </summary>
</histogram>

<histogram name="PerformanceManager.UserTuning.BatterySaverModeEnabledPercent"
    units="%" expires_after="2027-01-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="2026-06-07">
  <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="2026-11-01">
  <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>
