<!--
Copyright 2024 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 Task Manager 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="NumberOfProcessBuckets">
  <variant name="Fifth" summary="The fifth process to be ended."/>
  <variant name="First" summary="The first process to be ended."/>
  <variant name="Fourth" summary="The fourth process to be ended."/>
  <variant name="Second" summary="The second process to be ended."/>
  <variant name="Third" summary="The third process to be ended."/>
</variants>

<variants name="Tabs">
  <variant name="All" summary="The elapsed time in the 'All tasks' tab."/>
  <variant name="Browser"
      summary="The elapsed time in the 'Browser tab' (Win/Mac/Linux only)."/>
  <variant name="System"
      summary="The elapsed time in the 'System tab' (ChromeOS only)."/>
  <variant name="TabsAndExtensions"
      summary="The elapsed time in the 'Tabs and extensions' tab."/>
</variants>

<histogram name="TaskManager.Closed.ElapsedTime" units="ms"
    expires_after="2026-06-21">
  <owner>mwoj@google.com</owner>
  <owner>cros-sw-perf@google.com</owner>
  <summary>
    How long the Task Manager stayed opened for before it was closed.
  </summary>
</histogram>

<histogram name="TaskManager.Closed.{Tab}.ElapsedTime" units="ms"
    expires_after="2026-06-21">
  <owner>mwoj@google.com</owner>
  <owner>cros-sw-perf@google.com</owner>
  <summary>
    How long the user stayed on a particular tab. This metric gets recorded
    whenever the Task Manager is closed.
  </summary>
  <token key="Tab" variants="Tabs"/>
</histogram>

<histogram name="TaskManager.Opened" enum="StartAction"
    expires_after="2026-12-27">
  <owner>mwoj@google.com</owner>
  <owner>cros-sw-perf@google.com</owner>
  <summary>
    Logged every time the Task Manager is opened, and captures where the Task
    Manager was started from.
  </summary>
</histogram>

<histogram name="TaskManager.{NthProcess}ProcessEnded.ElapsedTime" units="ms"
    expires_after="2026-06-28">
  <owner>mwoj@google.com</owner>
  <owner>cros-sw-perf@google.com</owner>
  <summary>
    How long it took to end some nth process. When n is 1, the starting time in
    the calculation is the initialization time of the task manager. When n
    greater than 1, the elapsed time is the delta between end process clicks.
    Captures up to 5 processes.
  </summary>
  <token key="NthProcess" variants="NumberOfProcessBuckets"/>
</histogram>

</histograms>

</histogram-configuration>
