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

<histogram name="DiskCache.0.Error" enum="DiskCacheError"
    expires_after="2027-01-31">
  <owner>wfh@chromium.org</owner>
  <owner>src/net/disk_cache/OWNERS</owner>
  <summary>
    Critical error ids. Reported each time the disk backed blockfile cache
    encounters an error or a critical error. Warning: this histogram was expired
    from Oct 2020 to Sep 2021; data may be missing.
  </summary>
</histogram>

<histogram name="DiskCache.0.EvictedAge" units="ms" expires_after="2027-01-17">
  <owner>ricea@chromium.org</owner>
  <owner>src/net/disk_cache/OWNERS</owner>
  <summary>
    The elapsed time since an entry evicted from the HTTP disk cache was last
    used (or created). Logged once for every entry that is evicted, but only
    when the value is less than a day.
  </summary>
</histogram>

<histogram name="DiskCache.0.EvictedRank" enum="DiskCacheRanking"
    expires_after="2025-12-28">
  <owner>ricea@chromium.org</owner>
  <owner>src/net/disk_cache/OWNERS</owner>
  <summary>
    The rank of a single entry evicted from the HTTP disk cache. Logged once for
    every entry that is evicted.
  </summary>
</histogram>

<histogram name="DiskCache.0.TotalIOTimeRead" units="ms"
    expires_after="2027-01-17">
  <owner>jam@chromium.org</owner>
  <owner>swarm-team@google.com</owner>
  <summary>
    The total time it takes to perform a read IO operation. This is emitted at
    each cache read, and measures from the IO thread to background thread,
    waiting for the disk read, and back to the IO thread.
  </summary>
</histogram>

<histogram name="DiskCache.0.TotalIOTimeWrite" units="ms"
    expires_after="2027-01-17">
  <owner>jam@chromium.org</owner>
  <owner>swarm-team@google.com</owner>
  <summary>
    The total time it takes to perform a write IO operation. This is emitted at
    each cache read, and measures from the IO thread to background thread,
    optionally waiting for the disk write, and back to the IO thread.
  </summary>
</histogram>

<histogram name="DiskCache.0.TrimmedDeletedRankingEntries" units="count"
    expires_after="2026-07-05">
  <owner>ricea@chromium.org</owner>
  <owner>src/net/disk_cache/OWNERS</owner>
  <summary>
    The number of deleted entries trimmed from the cache in a single call to
    disk_cache::Eviction::TrimDeleted(). Logged one for every call to the method
    for the HTTP cache when not emptying the cache.

    Since this method will delete at most 20 entries in a single call, a value
    of 20 may mean it called itself back asynchronously.
  </summary>
</histogram>

<histogram name="DiskCache.HashBucketOK.Sampled" enum="Boolean"
    expires_after="2026-09-06">
  <owner>morlovich@chromium.org</owner>
  <owner>src/net/disk_cache/OWNERS</owner>
  <summary>
    Whenever an entry is looked for in the index hash table, reports whether
    it's in the right bucket. Sampled to report 1% of the time.
  </summary>
</histogram>

<histogram name="DiskCache.MoveCacheToRestartCache.Windows"
    enum="BooleanSuccess" expires_after="2027-01-17">
  <owner>chikamune@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Record whether disk_cache::MoveCache() succeeded or not to RestartCache on
    Windows. This is recorded on each call of MoveFileEx() to RestartCache. When
    MoveFileEx() returns true, true is recorded.
  </summary>
</histogram>

<histogram name="DiskCache.MoveCacheToRestartCacheError.Windows"
    enum="WinGetLastError" expires_after="2027-01-17">
  <owner>chikamune@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Record the Windows GetLastError after a failure of disk_cache::MoveCache().
    This is recorded on each failure of MoveFileEx() to RestartCache.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
