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

<!--
Copyright 2020 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 others 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="Length">
  <variant name="Any" summary="of arbitrary length"/>
  <variant name="Medium" summary="lasting between 1 and 100ms"/>
</variants>

<variants name="NamedThread">
  <variant name="BrowserIO" summary="the browser IO thread"/>
  <variant name="BrowserUI" summary="the browser UI thread"/>
  <variant name="Other"/>
</variants>

<histogram name="MessagePumpEpoll.WatchedFileDescriptors"
    units="FileDescriptors" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of file descriptors in the watch list for the epoll message pump.
    Sampled periodically every minute for each thread with an epoll message
    pump.
  </summary>
</histogram>

<histogram name="Scheduling.BeginImplFrameLatency2" units="microseconds"
    expires_after="M85">
  <owner>[email protected]</owner>
  <summary>
    The time from v-sync to when the main side actually starts the
    BeginImplFrame.

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution. When considering
    revising this histogram, see UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES for the
    solution.
  </summary>
</histogram>

<histogram name="Scheduling.DBusSchedQoS.PidReusedOnSetProcessState"
    enum="PidReuseResult" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not a pid is reused between the time a SetProcessState
    DBus request is dispatched and when the request's result is processed. Pid
    reuse can race with the DBus request to result in the requested scheduler
    settings being applied to the wrong process, although this metric cannot
    differentiate between winning and losing that race. This is emitted every
    time a new Chrome process is created or changes background state.
  </summary>
</histogram>

<histogram name="Scheduling.DBusSchedQoS.PidReusedOnSetThreadState"
    enum="PidReuseResult" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not a pid is reused between the time a SetThreadState
    DBus request is dispatched and when the request's result is processed. Pid
    reuse can race with the DBus request to result in the requested scheduler
    settings being applied to the wrong thread, although this metric cannot
    differentiate between winning and losing that race. This is emitted every
    time Chrome creates a thread or changes a thread type.
  </summary>
</histogram>

<histogram name="Scheduling.DBusSchedQoS.SetProcessStateLatency"
    units="microseconds" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records amount of time it takes to execute SetProcessState DBus request on
    ChromeOS. This is emitted every time a new Chrome process is created or
    changes background state. All ChromeOS clients have high-resolution timers.
  </summary>
</histogram>

<histogram name="Scheduling.DBusSchedQoS.SetThreadStateLatency"
    units="microseconds" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records amount of time it takes to execute SetThreadState DBus request on
    ChromeOS. This is emitted every time Chrome creates a thread or changes a
    thread type. All ChromeOS clients have high-resolution timers.
  </summary>
</histogram>

<histogram name="Scheduling.MessagePumpTimeKeeper.{NamedThread}"
    enum="MessagePumpPhases" expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of milliseconds spent in each phase of pumping tasks on
    {NamedThread}. Each enum value can be analyzed for its total time or as a
    percentage relative to other phases.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram name="Scheduling.Renderer.DrawInterval2" units="microseconds"
    expires_after="never">
<!-- expires-never: guiding metric (internal: go/chrome-browser-guiding-metrics) -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time delta between the draw times of back-to-back BeginImplFrames,
    regardless of whether or not they result in a swap.

    The interval is only recorded when every BeginImplFrame wants to draw.

    Do not modify this metric in any way without contacting
    [email protected] AND [email protected].

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution. When considering
    revising this histogram, see UMA_HISTOGRAM_CUSTOM_HIGH_RESOLUTION_TIMES for
    the solution.
  </summary>
</histogram>

<histogram name="Scheduling.SchedQoS.SetProcessStateError" enum="QoSErrorType"
    expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The error types from schedqos feature in resourced. This is recorded each
    time the SetProcessState DBus request fails. The request rarely fails.
  </summary>
</histogram>

<histogram name="Scheduling.SchedQoS.SetThreadStateError" enum="QoSErrorType"
    expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The error types from schedqos feature in resourced. This is recorded each
    time the SetThreadState DBus request fails. The request rarely fails.
  </summary>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalDuration.Short.{NamedThread}"
    units="microseconds" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration of an active period of less than 1 millisecond using
    ThreadController on {NamedThread}. Recorded when an active period ends.
    Sub-sampled to 0.1% of intervals.

    WARNING: This metric is not recorded on clients with low-resolution clocks,
    which means measurments are biased against a portion of the population on
    Windows. See Windows.HasHighResolutionTimeTicks for additional details.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalDuration.{Length}.{NamedThread}"
    units="ms" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration of an active period {Length} using ThreadController
    {NamedThread}. Recorded when an active period ends. Sub-sampled to 0.1% of
    intervals.
  </summary>
  <token key="Length" variants="Length"/>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOffCpuDuration.Short.{NamedThread}"
    units="microseconds" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration spent off-cpu during an active period of less than 1
    millisecond using ThreadController on {NamedThread}. Recorded when an active
    period ends. Sub-sampled to 0.1% of intervals.

    WARNING: This metric is not recorded on clients with low-resolution clocks,
    which means measurments are biased against a portion of the population on
    Windows. See Windows.HasHighResolutionTimeTicks for additional details.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOffCpuDuration.{Length}.{NamedThread}"
    units="ms" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration spent off-cpu during an active period {Length} operiod
    using ThreadController on {NamedThread}. Recorded when an active period
    ends. Sub-sampled to 0.1% of intervals.
  </summary>
  <token key="Length" variants="Length"/>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOnCpuDuration.Short.{NamedThread}"
    units="microseconds" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration spent on-cpu during an active period of less than 1
    millisecond using ThreadController on {NamedThread}. Recorded when an active
    period ends. Sub-sampled to 0.1% of intervals.

    WARNING: This metric is not recorded on clients with low-resolution clocks,
    which means measurments are biased against a portion of the population on
    Windows. See Windows.HasHighResolutionTimeTicks for additional details.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOnCpuDuration.{Length}.{NamedThread}"
    units="ms" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration spent on-cpu during an active period {Length} using
    ThreadController on {NamedThread}. Recorded when an active period ends.
    Sub-sampled to 0.1% of intervals.
  </summary>
  <token key="Length" variants="Length"/>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOnCpuPercentage.Short.{NamedThread}"
    units="%" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of time a thread stayed on-cpu during an active
    ThreadController period of less than 1 millisecond on {NamedThread}.
    Recorded when an active period ends. Sub-sampled to 0.1% of intervals.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveIntervalOnCpuPercentage.{Length}.{NamedThread}"
    units="%" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of time a thread stayed on-cpu during an active
    ThreadController period {Length} on {NamedThread}. Recorded when an active
    period ends. Sub-sampled to 0.1% of intervals.
  </summary>
  <token key="Length" variants="Length"/>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveOffCpuVsWallTimePercentage.CrGpuMain"
    units="%" expires_after="2025-05-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of time the main GPU thread stayed off-cpu during
    active periods relative to the total time since the last metric was stored.
    Recorded over a window of length one second and each sample is independent
    of the previous one, hence knowing the value of x[i] does not provide any
    information about x[i+1].

    Example: if the main GPU thread has been in an active state for 200 ms
    during the last second and 50 ms was off-cpu, as sample of 5% is stored. In
    this example, the corresponding on-cpu sample would be 15%.

    NOTE: This metric is only recorded when the command-line flag
    enable-gpu-main-time-keeper-metrics is enabled.
  </summary>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveOnCpuVsWallTimePercentage.CrGpuMain"
    units="%" expires_after="2025-05-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of time the main GPU thread stayed on-cpu during
    active periods relative to the total time since the last metric was stored.
    Recorded over a window of length one second and each sample is independent
    of the previous one, hence knowing the value of x[i] does not provide any
    information about x[i+1].

    Example: if the main GPU thread has been in an active state for 200 ms
    during the last second and 150 ms was on-cpu, as sample of 15% is stored. In
    this example, the corresponding off-cpu sample would be 5%.

    NOTE: This metric is only recorded when the command-line flag
    enable-gpu-main-time-keeper-metrics is enabled.
  </summary>
</histogram>

<histogram
    name="Scheduling.ThreadController.ActiveVsWallTimePercentage.CrGpuMain"
    units="%" expires_after="2025-05-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of time the main GPU thread is active relative to the
    total time since the last metric was stored. Recorded over a window of
    length one second and each sample is independent of the previous one, hence
    knowing the value of x[i] does not provide any information about x[i+1].

    Example: if the main GPU thread has been in an active state for 200 ms
    during the last second, a sample of 20% will be stored.

    NOTE: This metric is only recorded when the command-line flag
    enable-gpu-main-time-keeper-metrics is enabled.
  </summary>
</histogram>

<histogram name="Scheduling.ThreadController.IdleDuration.Short.{NamedThread}"
    units="microseconds" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration of an idle period of less than 1 millisecond using
    ThreadController on {NamedThread}. Recorded when an active period begins.
    Sub-sampled to 0.1% of intervals.

    WARNING: This metric is not recorded on clients with low-resolution clocks,
    which means measurments are biased against a portion of the population on
    Windows. See Windows.HasHighResolutionTimeTicks for additional details.
  </summary>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram
    name="Scheduling.ThreadController.IdleDuration.{Length}.{NamedThread}"
    units="ms" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration of an idle period {Length} using ThreadController on
    {NamedThread}. Recorded when an active period begins. Sub-sampled to 0.1% of
    intervals.
  </summary>
  <token key="Length" variants="Length"/>
  <token key="NamedThread" variants="NamedThread"/>
</histogram>

<histogram base="true" name="ThreadPool.NumTasksBeforeDetach" units="tasks"
    expires_after="M85">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of tasks executed by a SchedulerWorker before it detached. Recorded
    when a SchedulerWorker detaches.
  </summary>
</histogram>

<histogram base="true" name="ThreadPool.UnnecessaryWakeup" enum="BooleanHit"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records a hit when a thread pool worker thread woke up unnecessarily (when
    the first GetWork called by a WorkerThread post-wakeup doesn't return a
    task). This count can be compared between experiments aiming to reduce
    wakeups. Or, it could be used to derive wakeups/{foo} by using UMA formulas
    against other time-or-event-based metrics.
  </summary>
</histogram>

</histograms>

</histogram-configuration>