chromium/tools/metrics/histograms/metadata/service/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 Service 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="EmbeddedWorkerInitialStatus">
  <variant name="" summary=""/>
  <variant name=".RUNNING"
      summary="The service worker was in RUNNING state when
               ServiceWorkerMainResourceLoader was created."/>
  <variant name=".STARTING"
      summary="The service worker was in STARTING state when
               ServiceWorkerMainResourceLoader was created."/>
  <variant name=".STOPPED"
      summary="The service worker was in STOPPED state when
               ServiceWorkerMainResourceLoader was created."/>
  <variant name=".STOPPING"
      summary="The service worker was in STOPPING state when
               ServiceWorkerMainResourceLoader was created."/>
  <variant name=".WARMED_UP"
      summary="The service worker was in WARMED_UP state when
               ServiceWorkerMainResourceLoader was created."/>
  <variant name=".WARMING_UP"
      summary="The service worker was in WARMING_UP state when
               ServiceWorkerMainResourceLoader was created."/>
</variants>

<variants name="NavigationType">
  <variant name="" summary=""/>
  <variant name=".AnyOriginNavigation"
      summary="This is recorded for both cross-origin and same-origin
               navigation."/>
  <variant name=".CrossOriginNavigation"
      summary="This is only recorded when navigation is cross origin
               navigation."/>
  <variant name=".SameOriginNavigation"
      summary="This is only recorded when navigation is same origin
               navigation."/>
</variants>

<variants name="ServiceWorkerCacheClientType">
  <variant name="BackgroundSyncManager"
      summary="Collected from a BackgroundSyncManager instance"/>
  <variant name="Cache" summary="Collected from a CacheStorageCache instance"/>
  <variant name="CacheStorage"
      summary="Collected from a CacheStorage instance"/>
</variants>

<variants name="ServiceWorkerCacheProcessType">
  <variant name="Browser"
      summary="Measurements taken in the browser process on the IO thread"/>
  <variant name="Renderer"
      summary="Measurements taken in the renderer process on the javascript
               thread"/>
</variants>

<variants name="ServiceWorkerCacheSchedulerOpClientType">
  <variant name="Cache" summary="Collected from a CacheStorageCache instance"/>
  <variant name="CacheStorage"
      summary="Collected from a CacheStorage instance"/>
</variants>

<variants name="ServiceWorkerEventType">
  <variant name="ACTIVATE"/>
  <variant name="BACKGROUND_FETCH_ABORT"/>
  <variant name="BACKGROUND_FETCH_CLICK"/>
  <variant name="BACKGROUND_FETCH_FAIL"/>
  <variant name="BACKGROUND_FETCH_SUCCESS"/>
  <variant name="COOKIE_CHANGE"/>
  <variant name="FETCH_FENCED_FRAME"/>
  <variant name="FETCH_MAIN_FRAME"/>
  <variant name="FETCH_SHARED_WORKER"/>
  <variant name="FETCH_SUB_FRAME"/>
  <variant name="FETCH_SUB_RESOURCE"/>
  <variant name="INSTALL"/>
  <variant name="LONG_RUNNING_MESSAGE"/>
  <variant name="MESSAGE"/>
  <variant name="NAVIGATION_HINT"/>
  <variant name="NOTIFICATION_CLICK"/>
  <variant name="NOTIFICATION_CLOSE"/>
  <variant name="PUSH"/>
  <variant name="SYNC"/>
  <variant name="UNKNOWN"/>
</variants>

<variants name="ServiceWorkerFetchEventResult">
  <variant name="GOT_RESPONSE"/>
  <variant name="SHOULD_FALLBACK"/>
</variants>

<variants name="ServiceWorkerFetchResponseFromName">
  <variant name="ServiceWorker"/>
  <variant name="WithoutServiceWorker"/>
</variants>

<variants name="ServiceWorkerResponseSource">
  <variant name="" summary=""/>
  <variant name=".CacheStorage" summary="The response came from CacheStorage."/>
  <variant name=".HttpCache" summary="The response came from HttpCache."/>
  <variant name=".Network" summary="The response directly came from network."/>
  <variant name=".Unspecified"
      summary="The source of a response was unspecified."/>
</variants>

<variants name="ServiceWorkerSchedulerOp">
  <variant name="Close"/>
  <variant name="Delete"/>
  <variant name="GetAllMatched"/>
  <variant name="Has"/>
  <variant name="Init"/>
  <variant name="Keys"/>
  <variant name="Match"/>
  <variant name="MatchAll"/>
  <variant name="Open"/>
  <variant name="Put"/>
  <variant name="Size"/>
  <variant name="SizeThenClose"/>
  <variant name="WriteIndex"/>
  <variant name="WriteSideData"/>
</variants>

<histogram name="ServiceWorker.AbortPaymentEvent.Time" units="ms"
    expires_after="2024-10-18">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching an AbortPaymentEvent to a Service Worker
    and receiving a message that it finished handling the event. Includes the
    time for the waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.ActivateEvent.Time" units="ms"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of ServiceWorkerGlobalScope.onactivate. Includes the time for
    waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.ActivateEventStatus"
    enum="ServiceWorkerStatusCode" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of dispatching the activate event to the worker. This is recorded
    to both ServiceWorker.ActivateEventStatus and whichever of
    ServiceWorker.ActivateEventStatus_InShutdown
    ServiceWorker.ActivateEventStatus_NotInShutdown is appropriate. (InShutdown
    means the context was null or ServiceWorkerProcessManger::Shutdown was
    called.)
  </summary>
</histogram>

<histogram name="ServiceWorker.CacheStorageInstalledScript.CachedMetadataSize"
    units="bytes" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The length of cached metadata of scripts which are stored to the
    CacheStorage by the installing service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.CacheStorageInstalledScript.CachedMetadataTotalSize"
    units="bytes" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The total length of cached metadata of scripts which are stored to the
    CacheStorage by the installing service worker.
  </summary>
</histogram>

<histogram name="ServiceWorker.CacheStorageInstalledScript.Count" units="count"
    expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The counts of scripts which are stored to the CacheStorage by the installing
    service worker.
  </summary>
</histogram>

<histogram name="ServiceWorker.CacheStorageInstalledScript.ScriptSize"
    units="bytes" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The length of scripts which are stored to the CacheStorage by the installing
    service worker.
  </summary>
</histogram>

<histogram name="ServiceWorker.CacheStorageInstalledScript.ScriptTotalSize"
    units="bytes" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The total length of scripts which are stored to the CacheStorage by the
    installing service worker.
  </summary>
</histogram>

<histogram name="ServiceWorker.CanMakePaymentEvent.Time" units="ms"
    expires_after="2024-10-18">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching an CanMakePaymentEvent to a Service
    Worker and receiving a message that it finished handling the event. Includes
    the time for the waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.CorsExemptHeaderListSize" units="count"
    expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The size of `cors_exempt_header_list` passed from the browser in the
    ServiceWorker startup.

    This is recorded in `WebServiceWorkerFetchContext::Create()`, in order to
    ensure the fix for crbug.com/40753993 doesn't introduce any changes to the
    given `cors_exempt_header_list` used in the ServiceWorker.
  </summary>
</histogram>

<histogram name="ServiceWorker.CountUse.CallerInterface"
    enum="WorkerOrWorkletInterfaceNameType" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    When WorkerOrWorkletGlobalScope::CountUse() is called, this UMA records the
    current object's interface name. This UMA is for investigating
    crbug.com/40918057.
  </summary>
</histogram>

<histogram name="ServiceWorker.CountUse.DedicatedWorker.WebFeature"
    units="WebFeature" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    When WorkerOrWorkletGlobalScope::CountUse() is called for a dedicated
    worker, this UMA records the WebFeature to be recorded with the CountUse().
    Metrics that does not limit to the dedicated worker caller exists as
    ServiceWorker.CountUse.WebFeature. This UMA is for investigating
    crbug.com/40918057.
  </summary>
</histogram>

<histogram name="ServiceWorker.CountUse.WebFeature" units="WebFeature"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    When WorkerOrWorkletGlobalScope::CountUse() is called for a dedicated
    worker, this UMA records the WebFeature to be recorded with the CountUse().
    This UMA is for investigating crbug.com/40918057.
  </summary>
</histogram>

<histogram name="ServiceWorker.Database.DestroyDatabaseResult"
    enum="ServiceWorkerDatabaseStatus" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of destroy database operations in ServiceWorkerDatabase.
  </summary>
</histogram>

<histogram name="ServiceWorker.Database.OpenResult"
    enum="ServiceWorkerDatabaseStatus" expires_after="never">
<!-- expires-never: core storage metric; consumed in separate dashboard (go/chrome-storage-dashboard) -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of opening a database for ServiceWorkerDatabase.
  </summary>
</histogram>

<histogram name="ServiceWorker.Database.ReadResult"
    enum="ServiceWorkerDatabaseStatus" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records result of read operations in ServiceWorkerDatabase.</summary>
</histogram>

<histogram name="ServiceWorker.Database.WriteResult"
    enum="ServiceWorkerDatabaseStatus" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of write operations in ServiceWorkerDatabase.
  </summary>
</histogram>

<histogram name="ServiceWorker.DiskCache.InitResult" units="units"
    expires_after="2024-08-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of opening a disk cache for ServiceWorkerDiskCache.
  </summary>
</histogram>

<histogram name="ServiceWorker.DiskCache.ReadResponseResult"
    enum="ServiceWorkerReadResponseResult" expires_after="2023-12-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of reading response from ServiceWorkerDiskCache.
  </summary>
</histogram>

<histogram name="ServiceWorker.DiskCache.WriteResponseResult"
    enum="ServiceWorkerWriteResponseResult" expires_after="2024-10-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of writing response into ServiceWorkerDiskCache. This is not
    recorded when response has no body. Note that this is recorded on every
    write operation, and can there can be multiple write operations for the same
    response if it is large enough.
  </summary>
</histogram>

<histogram name="ServiceWorker.EvaluateTopLevelScript.{ResultStatus}.Time"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of the service worker's top level script. The metric is
    recorded for each startup of service workers. Recorded only when the
    evaluation was {ResultStatus}.
  </summary>
  <token key="ResultStatus">
    <variant name="Failed" summary="failed"/>
    <variant name="Succeeded" summary="succeeded"/>
  </token>
</histogram>

<histogram name="ServiceWorker.ExtendableMessageEvent.Time" units="ms"
    expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching an ExtendableMessageEvent to a Service
    Worker and receiving a message that it finished handling the event. Includes
    the time for the waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.Fallback.Time" units="ms"
    expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching a FetchEvent to a Service Worker and
    receiving a fallback-to-network reply.

    This histogram was expired between roughly 2021-08-01 and 2021-09-30.
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.HasResponse.Time" units="ms"
    expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching a FetchEvent to a Service Worker and
    receiving a response. Includes the time for the respondWith() promise to
    settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.MainResource.Status"
    enum="ServiceWorkerStatusCode" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of dispatching a fetch event to a Service Worker for a main
    resource request (i.e., a request for a navigation or a shared worker).
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.QueuingTime" units="ms"
    expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time that a fetch event was queued. The start time is when the event is
    created on the service worker thread and added to the
    ServiceWorkerEventQueue. The end time is when the event is dequeued and the
    event handler starts to execute.
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.Subresource.Status"
    enum="ServiceWorkerStatusCode" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of dispatching a fetch event to a Service Worker for a
    subresource request (i.e., not a navigation or a shared worker request).
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchEvent.{Resource}.FetchResponseFrom"
    enum="ServiceWorkerFetchResponseFrom" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of the RaceNetworkRequest. RaceNetworkRequest runs a race between
    the network request which bypasses ServiceWorker, and the other request
    which goes through the fetch handler. This metric is recorded for
    {Resource}.
  </summary>
  <token key="Resource">
    <variant name="MainResource" summary="main resource"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
</histogram>

<histogram
    name="ServiceWorker.FetchEvent.{Resource}.RaceNetworkRequest.DataTransfer.{Action}"
    enum="ServiceWorkerRaceNetworkRequestDataTransferMojoResult"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of {Action} mojo data pipe operation while transfering data from
    RaceNetworkRequest result. RaceNetworkRequest runs a race between the
    network request which bypasses ServiceWorker, and the other request which
    goes through the fetch handler. This metric is recorded for {Resource}.

    ServiceWorker.FetchEvent.{Resource}.RaceNetworkRequest.DataTransfer.Read was
    broken from 2024-03-05 and 2024-03-25.
  </summary>
  <token key="Resource">
    <variant name="MainResource" summary="main resource"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
  <token key="Action">
    <variant name="Initial"
        summary="the value passed as a callback value in SimpleWatcher"/>
    <variant name="Read" summary="read"/>
    <variant name="WriteForFetchHandler" summary="write for fetch handler"/>
    <variant name="WriteForRaceNetworkRequset"
        summary="write for race network request"/>
  </token>
</histogram>

<histogram
    name="ServiceWorker.FetchEvent.{Resource}.RaceNetworkRequest.Redirect"
    enum="Boolean" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result if the RaceNetworkRequest received a redirect response.
    RaceNetworkRequest runs a race between the network request which bypasses
    ServiceWorker, and the other request which goes through the fetch handler.
    This metric is recorded for {Resource}.
  </summary>
  <token key="Resource">
    <variant name="MainResource" summary="main resource"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
</histogram>

<histogram name="ServiceWorker.FetchHandler.SkipReason"
    enum="ServiceWorkerFetchHandlerSkipReason" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The reason why the service worker fetch handler has been skipped. If the
    fetch handler has not been skipped for any reasons, it is just recorded as
    not skipped instead.
  </summary>
</histogram>

<histogram name="ServiceWorker.FetchHandler.TypeAtContinueWithActivatedVersion"
    enum="ServiceWorkerFetchHandlerType" expires_after="2024-09-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The type of the fetch handler recorded just before dispatching the fetch
    handler. This represent the fetch handler type, and does not represent if
    the fetch handler is skipped or not.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.FindRegistrationForClientUrl.IsCalledForNavigation"
    enum="Boolean" expires_after="2025-07-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether FindRegistrationForClientUrl() is called for navigation or not. This
    is recorded when FindRegistrationForClientUrl() function is called.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.FindRegistrationForClientUrl.SkippedMojoCall.OnNavigation"
    enum="BooleanSkipped" expires_after="2025-07-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether FindRegistrationForClientUrl() could skip calling mojo API by using
    scope cache. This is recorded only when FindRegistrationForClientUrl() is
    used for navigation.
  </summary>
</histogram>

<histogram name="ServiceWorker.FindRegistrationForClientUrl.Time" units="ms"
    expires_after="2025-07-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of FindRegistrationForClientUrl until continuation is called.
    The metric is not recorded during startup.
  </summary>
</histogram>

<histogram name="ServiceWorker.FoundServiceWorkerRegistrationOnNavigation"
    enum="BooleanFound" expires_after="2025-07-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether ServiceWorkerControlleeRequestHandler::MaybeCreateLoader found a
    service worker registration after looking up the registration by using
    FindRegistrationForClientUrl.
  </summary>
</histogram>

<histogram name="ServiceWorker.InstallEvent.All.FetchCount" units="fetches"
    expires_after="2023-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of network fetches performed by the install event handler.
  </summary>
</histogram>

<histogram name="ServiceWorker.InstallEvent.{type}.Status"
    enum="ServiceWorkerStatusCode" expires_after="2023-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of dispatching the install event to the worker. This histogram
    includes data for {type}.
  </summary>
  <token key="type">
    <variant name="All" summary="all install events"/>
    <variant name="WithFetch"
        summary="install events that made network fetches"/>
  </token>
</histogram>

<histogram name="ServiceWorker.InstallEvent.{type}.Time" units="ms"
    expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching an InstallEvent to a Service Worker and
    receiving a message that it finished handling the event. Includes the time
    for the waitUntil() promise to settle. This histogram includes data for
    {type}.
  </summary>
  <token key="type">
    <variant name="All" summary="all install events"/>
    <variant name="WithFetch"
        summary="install events that made network fetches"/>
  </token>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.AutoPreloadResponseReceivedToFetchHandlerEnd.{ServiceWorkerFetchResponseFromName}"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the response of the AutoPreload is received, to (b)
    the fetch handler execution is completed.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler, the fetch event was successfully dispatched to the
    service worker, and ServiceWorkerAutoPreload is enabled.

    This is recorded even in the case when (b) is faster than (a). In this case
    the value will be 0.

    The response is from {ServiceWorkerFetchResponseFromName}
  </summary>
  <token key="ServiceWorkerFetchResponseFromName"
      variants="ServiceWorkerFetchResponseFromName"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FetchHandlerEndToFallbackNetwork{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) renderer process sends an IPC message to notify that
    a resource loading request needs to be fall back to network, to (b) browser
    process received the IPC. Recorded when no fetch event handler provided a
    response to the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FetchHandlerEndToResponseReceived{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) renderer process sends an IPC message to notify that
    a promise of respondWith() is settled, to (b) browser process received the
    IPC message. Recorded when a fetch event handler handled the request and
    provided a response to the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FetchHandlerStartToFetchHandlerEndByFetchResult_{ServiceWorkerFetchEventResult}"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) a fetch event is dispatched, to (b) respondWith() is
    settled for the fetch event, or fetch event dispatch is finished without
    respondWith() being called.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    The records are breakdown by FetchEventResult.
  </summary>
  <token key="ServiceWorkerFetchEventResult"
      variants="ServiceWorkerFetchEventResult"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FetchHandlerStartToFetchHandlerEnd{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) a fetch event is dispatched, to (b) respondWith() is
    settled for the fetch event, or fetch event dispatch is finished without
    respondWith() being called.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FindRegistrationToCompleted{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of finding service worker registration, to
    (b) reading response body is completed. Recorded when a fetch event handler
    handled the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FindRegistrationToFallbackNetwork{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of finding service worker registration, to
    (b) browser process received the IPC. Recorded when no fetch event handler
    provided a response to the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.FindRegistrationToRequestStart{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of finding service worker registration, to
    (b) the start of a navigation request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.ForwardServiceWorkerToWorkerReady2{EmbeddedWorkerInitialStatus}{NavigationType}"
    units="ms" expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) a resource loading request is routed to service
    worker path, to (b) a service worker is ready to handle the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    Please note that this histogram has accidentally changed the bucket
    definition from 117.0.5874.0. Previously, UMA_HISTOGRAM_MEDIUM_TIMES() was
    used, and it was replaced with base::UmaHistogramMediumTimes().
    UMA_HISTOGRAM_MEDIUM_TIMES() starts the bucket from 10ms whereas
    base::UmaHistogramMediumTimes() starts the bucket from 1ms.

    {EmbeddedWorkerInitialStatus}{NavigationType}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
  <token key="NavigationType" variants="NavigationType"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.InitialServiceWorkerStatus{NavigationType}{FrameTreeNodeType}{BrowserStartupCompleted}"
    enum="InitialServiceWorkerStatus" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The initial service worker status.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {NavigationType}{FrameTreeNodeType}{BrowserStartupCompleted}
  </summary>
  <token key="NavigationType" variants="NavigationType"/>
  <token key="FrameTreeNodeType">
    <variant name="" summary=""/>
    <variant name=".NotOutermostMainFrame"
        summary="Navigation is only recorded when it occurs in the non
                 outermost main frame."/>
    <variant name=".OutermostMainFrame"
        summary="Navigation is only recorded when it occurs in the outermost
                 main frame."/>
    <variant name=".Unknown"
        summary="Navigation is recorded only when it is not possible to
                 determine whether it occurs in the outermost main frame or
                 not."/>
  </token>
  <token key="BrowserStartupCompleted">
    <variant name="" summary=""/>
    <variant name=".BrowserStartupCompleted"
        summary="The browser startup has been completed already."/>
    <variant name=".BrowserStartupNotCompleted"
        summary="The browser startup has not been completed yet."/>
  </token>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.ResponseReceivedToCompleted2{ServiceWorkerResponseSource}{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) response headers from service worker are received,
    to (b) reading response body is completed. Recorded when a fetch event
    handler handled the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {ServiceWorkerResponseSource} {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="ServiceWorkerResponseSource"
      variants="ServiceWorkerResponseSource"/>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.ServiceWorkerIsStopped.WaitingForWarmUp"
    enum="Boolean" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Record true if the service worker is waiting for being warmed up. Otherwise
    record false.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and service worker is a STOPPED state.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.StartToCompleted{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of a navigation request, to (b) reading
    response body is completed. Recorded when a fetch event handler handled the
    request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.StartToFallbackNetwork{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of a navigation request, to (b) browser
    process received the IPC. Recorded when no fetch event handler provided a
    response to the request.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.StartToForwardServiceWorker{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of a navigation request, to (b) the
    request is forwarded to a service worker code path.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.MainFrame.MainResource.WorkerReadyToFetchHandlerStart{EmbeddedWorkerInitialStatus}"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) browser process sends an IPC message to dispatch a
    fetch event, to (b) a renderer process received the IPC message and is about
    to dispatch a fetch event.

    Recorded for each navigation request (including redirects) where there is a
    fetch event handler and the fetch event was successfully dispatched to the
    service worker.

    {EmbeddedWorkerInitialStatus}
  </summary>
  <token key="EmbeddedWorkerInitialStatus"
      variants="EmbeddedWorkerInitialStatus"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.AutoPreloadResponseReceivedToFetchHandlerEnd.{ServiceWorkerFetchResponseFromName}"
    units="ms" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the response of the AutoPreload is received, to (b)
    the fetch handler execution is completed.

    Recorded for each subresource request where there is a fetch event handler,
    the fetch event was successfully dispatched to the service worker, and
    ServiceWorkerAutoPreload is enabled.

    This is recorded even in the case when (b) is faster than (a). In this case
    the value will be 0.

    The response is from {ServiceWorkerFetchResponseFromName}
  </summary>
  <token key="ServiceWorkerFetchResponseFromName"
      variants="ServiceWorkerFetchResponseFromName"/>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.FetchHandlerEndToFallbackNetwork"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) service worker sends a mojo message to notify that a
    resource loading request needs to be fall back to network, to (b) the mojo
    message is received on the other side of mojo endpoint (a background thread
    executing subresource loading). Recorded when no fetch event handler
    provided a response to the request.

    Recorded for each subresource request where there is a fetch event handler
    and the fetch event was successfully dispatched to the service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.FetchHandlerEndToResponseReceived"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) service worker sends a mojo message to notify that a
    promise of respondWith() is settled, to (b) the mojo message is received on
    the other side of mojo endpoint (a background thread executing subresource
    loading). Recorded when a fetch event handler handled the request and
    provided a response to the request.

    Recorded for each subresource request where there is a fetch event handler
    and the fetch event was successfully dispatched to the service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.ForwardServiceWorkerToWorkerReady"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) a subresource request is routed to the URLLoader (on
    a background thread) for service worker controlled loads starts handling a
    subresource request, to (b) a service worker is ready to handle the request.

    Recorded for each subresource request where there is a fetch event handler
    and the fetch event was successfully dispatched to the service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.ResponseReceivedToCompleted2"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) response headers from service worker are received,
    to (b) reading response body is completed. Only recorded when a fetch event
    handler handled the request.

    Recorded for each subresource request where there is a fetch event handler
    and the fetch event was successfully dispatched to the service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTiming.Subresource.WorkerReadyToFetchHandlerEnd"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) a fetch event is dispatched, to (b) respondWith() is
    settled for the fetch event, or fetch event dispatch is finished without
    respondWith() being called.

    Recorded for each subresource request where there is a fetch event handler
    and the fetch event was successfully dispatched to the service worker.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.LoadTopLevelScript.{ResultStatus}.{WhetherAlreadyInstalledOrNot}.Time"
    units="ms" expires_after="2025-08-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Loading time of the service worker's top level script. The metric is
    recorded for each startup of service workers. Recorded only when the loading
    was {ResultStatus}, and the service worker scripts were
    {WhetherAlreadyInstalledOrNot}.
  </summary>
  <token key="WhetherAlreadyInstalledOrNot">
    <variant name="AlreadyInstalled" summary="already installed"/>
    <variant name="NewlyInstalled" summary="newly installed"/>
  </token>
  <token key="ResultStatus">
    <variant name="FailedToFetchClassicScript"
        summary="failed to fetch classic script"/>
    <variant name="FailedToFetchModuleScript"
        summary="failed to fetch module script"/>
    <variant name="Succeeded" summary="succeeded"/>
  </token>
</histogram>

<histogram name="ServiceWorker.MainFrame.MainResource.FetchResult"
    enum="ServiceWorkerFetchEventResult" expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the fetch result after the fetch handler has been dispatched. This
    is recorded after dispatching the fetch event handler to a service worker,
    and it executed the handler without error (i.e. abort or timeout).
  </summary>
</histogram>

<histogram name="ServiceWorker.MaybeStartWorker.Purpose"
    enum="ServiceWorkerMetrics.EventType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the purpose for potentially starting a service worker. This is
    recorded every time a running worker is required whether it needs to be
    started or not in the ServiceWorkerVersion::RunAfterStartWorker() method.
  </summary>
</histogram>

<histogram name="ServiceWorker.MaybeStartWorker.RunningStatus"
    enum="EmbeddedWorkerStatus" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Record the current status of a service worker when we need it to be running
    for some purpose. If the status is STOPPED or STOPPING then the service
    worker will be started. This is recorded from
    ServiceWorkerVersion::RunAfterStartWorker().

    See also ServiceWorker.MaybeStartWorker.RunningStatusByPurpose_* for the
    breakdown by event type.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.MaybeStartWorker.RunningStatusByPurpose_{ServiceWorkerEventType}"
    enum="EmbeddedWorkerStatus" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Record the current status of a service worker when we need it to be running
    broken down by the purpose for needing a worker. If the status is STOPPED or
    STOPPING then the service worker will be started. This is recorded from
    ServiceWorkerVersion::RunAfterStartWorker(). (see
    ServiceWorker.MaybeStartWorker.RunningStatus for all attempts).
  </summary>
  <token key="ServiceWorkerEventType" variants="ServiceWorkerEventType"/>
</histogram>

<histogram name="ServiceWorker.NumberOfRegisteredFetchHandlers"
    units="handlers" expires_after="2024-02-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of fetch handlers registered in a service worker script. This
    metrics is recorded every time a service worker starts and only includes
    fetch event handlers registered at script evaluation time.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.OnBrowserStartup.FirstFindRegistrationForClientUrl.Time"
    units="ms" expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of FindRegistrationForClientUrl until continuation is called.
    It is recorded only once on browser startup.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.OnBrowserStartup.SkipServiceWorkerOnFirstNavigation"
    enum="BooleanSkipped" expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether the first navigation requires checking the existence of service
    worker registration in DB. It is recorded only once on browser startup.
  </summary>
</histogram>

<histogram name="ServiceWorker.OnStarted.UpdatedFetchHandlerType"
    enum="ServiceWorkerFetchHandlerType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The type of the fetch handler type to be stored in the database for update.

    During the start of ServiceWorker, the fetch handler type is decided, and
    sent via OnStarted. If the fetch handler type is different from the fetch
    handler type already recognized and stored before, it will eventually be
    updated when it is read from the database next time.

    This metrics records the name of the new fetch handler detected.
    ServiceWorker.OnStarted.UpdatedFetchHandlerTypeBySourceType_* for the
    breakdown by the source fetch handler type.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.OnStarted.UpdatedFetchHandlerTypeBySourceType_{SourceType}"
    enum="ServiceWorkerFetchHandlerType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The type of the fetch handler type to be stored in the database for update
    per the source fetch handler type {SourceType} (See
    ServiceWorker.OnStarted.UpdatedFetchHandlerType for all attenpts).

    During the start of ServiceWorker, the fetch handler type is decided, and
    sent via OnStarted. If the fetch handler type is different from the fetch
    handler type already recognized and stored before, it will eventually be
    updated when it is read from the database next time.

    This metrics records the name of the new fetch handler detected.
  </summary>
  <token key="SourceType">
    <variant name="EMPTY_FETCH_HANDLER"
        summary="skippable empty fetch handler"/>
    <variant name="NO_HANDLER" summary="no fetch handler"/>
    <variant name="NOT_SKIPPABLE" summary="not skippable fetch handler"/>
  </token>
</histogram>

<histogram name="ServiceWorker.PaymentRequestEvent.Time" units="ms"
    expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching an PaymentRequestEvent to a Service
    Worker and receiving a message that it finished handling the event. Includes
    the time for the waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.PeriodicBackgroundSyncEvent.Time" units="ms"
    expires_after="2023-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken between dispatching a PeriodicSyncEvent to a Service Worker
    and receiving a message that it finished handling the event. Includes the
    time for the waitUntil() promise to settle.
  </summary>
</histogram>

<histogram name="ServiceWorker.RegisteredStorageKeyCount" units="origins"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of StorageKeys that have a service worker registration. Recorded
    near browser startup, when the service worker storage system is initialized.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.ConditionDepth" units="count"
    expires_after="2025-02-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Tha max depth of the conditions in rules registered with the ServiceWorker
    Static Routing API.

    Recorded when the service worker, which has associated routing info, is
    activated.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.Error"
    enum="ServiceWorkerRouterEvaluatorErrorEnums" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    An error that happens in ServiceWorkerRouterEvaluator setup. For calculating
    an error ratio, no error case is also recorded. This metrics will be
    recorded per ServiceWorkerRouterEvaluator instance.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.EvaluationTime"
    units="microseconds" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Time spent for the router evaluation to handle a request. Recorded when the
    service worker has associated routing info, and the browser or renderer is
    processing requests. Both main resource and subresource record this metric
    when being processed.

    This histogram only records metrics on machines with high-resolution clocks.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.MatchedFirstSourceType"
    enum="ServiceWorkerRouterSourceType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of the router evaluation of the ServiceWorker Static Routing API.
    This indicates which source type is used to get the resource. This will be
    recorded only when the router has matched the incoming resource.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.OrConditionWidth" units="count"
    expires_after="2025-02-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Tha max width of the &quot;or&quot; conditions in rules registered with the
    ServiceWorker Static Routing API.

    Recorded when the service worker, which has associated routing info, is
    activated.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.RuleCount" units="count"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The sum of registered router rules with the ServiceWorker Static Routing
    API. Recorded when the service worker, which has associated routing info, is
    activated. This was broken from 2024-02-07 to 2024-04-07.
  </summary>
</histogram>

<histogram name="ServiceWorker.RouterEvaluator.SubresourceTotalEvaluationTime"
    units="microseconds" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Total time spent for the router evaluation to handle a request for the
    subresources. Recorded when the service worker has associated routing info
    at the end of each page load or when the page is navigated away, the browser
    is closed, or on Android when the browser is backgrounded.

    This histogram only records metrics on machines with high-resolution clocks.
  </summary>
</histogram>

<histogram name="ServiceWorker.SharedWorkerScript.IsBlob" enum="Boolean"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether a SharedWorker script got via a ServiceWorker is a blob URL or not.
    This metrics is recorded in the main resource loader intereceptor during the
    script loading.
  </summary>
</histogram>

<histogram name="ServiceWorker.SkipCallingFindRegistrationForClientUrl"
    enum="BooleanSkipped" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether the navigation requires checking the existence of service worker
    registration by using FindRegistrationForClientUrl(). This metric is not
    recorded during startup.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartNewWorker.Time" units="ms"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken to start a Service Worker that has not yet installed, from
    process allocation to ACK of started from the renderer (which occurs after
    script execution). This may include script download time. The metric is not
    recorded if DevTools was ever attached to the Service Worker during startup.
    See also ServiceWorker.StartWorker.Time for installed workers.

    This histogram was expired between approximately Feb through Sep 2021.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.ClockConsistency"
    enum="CrossProcessTimeDelta" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded on each successful service worker startup.
    ServiceWorker.StartTiming.* uses timing data from both the renderer process
    and browser process. This histogram describes whether the clocks are known
    to be accurate and consistent accross processes, and whether the actual
    timing data for this worker startup was consistent, i.e., TimeTicks did not
    go backwards.

    If the clocks and timing were inconsistent, ServiceWorker.StartTiming.*
    metrics (other than this one) are not recorded.

    This histogram was expired between roughly 2021-07-30 and 2021-09-31.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.Duration" units="ms"
    expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken to start a service worker that is already installed, from
    start of the start sequence (finding a renderer) to ACK of started from the
    renderer (which occurs after script execution). The metric is not recorded
    if DevTools was ever attached to the Service Worker during startup. It does
    not include time, if any, waiting for the service worker to finish stopping
    before asking it to start, if that occurred.

    This histogram was expired between roughly 2021-07-30 and 2021-09-31.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.StartTiming.ReceivedStartWorkerToScriptEvaluationStart"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the renderer receiving the start worker IPC message,
    to (b) initial JavaScript evaluation starting on the worker thread. Recorded
    when ServiceWorker.StartTiming.Duration is recorded.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.ScriptEvaluationEndToEnd" units="ms"
    expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) initial JavaScript evaluation finishing on the
    worker thread, to (b) the browser receiving the worker started IPC message
    (the final step of worker startup). Recorded when
    ServiceWorker.StartTiming.Duration is recorded.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.StartTiming.ScriptEvaluationStartToScriptEvaluationEnd"
    units="ms" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) initial JavaScript evaluation starting on the worker
    thread, to (b) initial JavaScript evaluation finishing on the worker thread.
    Recorded when ServiceWorker.StartTiming.Duration is recorded.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.StartTiming.SentStartWorkerToReceivedStartWorker"
    units="ms" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the browser sending the start worker IPC message, to
    (b) the renderer receiving the start worker IPC message. Recorded when
    ServiceWorker.StartTiming.Duration is recorded.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.StartToReceivedStartWorker"
    units="ms" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of service worker startup, to (b) the
    renderer receiving the start worker IPC message. Recorded when
    ServiceWorker.StartTiming.Duration is recorded.

    This histogram was expired between roughly 2021-07-30 and 2021-09-31.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.StartToScriptEvaluationEnd"
    units="ms" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of service worker startup, to (b) initial
    JavaScript evaluation finishing on the worker thread. Recorded when
    ServiceWorker.StartTiming.Duration is recorded.

    This histogram was expired between roughly 2021-07-30 and 2021-09-31.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.StartToScriptEvaluationStart"
    units="ms" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of service worker startup, to (b) initial
    JavaScript evaluation starting on the worker thread. Recorded when
    ServiceWorker.StartTiming.Duration is recorded.

    This histogram was expired between roughly 2021-07-30 and 2021-09-31.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartTiming.StartToSentStartWorker" units="ms"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken from (a) the start of service worker startup, to (b) the
    browser sending the start worker IPC message. Recorded when
    ServiceWorker.StartTiming.Duration is recorded.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartWorker.Purpose"
    enum="ServiceWorkerMetrics.EventType" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The purpose for starting up a service worker. Recorded only for installed
    workers.

    This histogram was expired between approximately Feb through Sep 2021.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartWorker.Status"
    enum="ServiceWorkerStatusCode" expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of trying to start a Service Worker that is already installed.
    See also ServiceWorker.StartNewWorker.Status for new workers. See also
    ServiceWorker.StartWorker.StatusByPurpose_* for the breakdown by event type.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.StartWorker.StatusByPurpose_{ServiceWorkerEventType}"
    enum="ServiceWorkerStatusCode" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of trying to start a service worker for the event type
    {ServiceWorkerEventType} (see ServiceWorker.StartWorker.Status for all start
    attempts). Only recorded for installed workers.
  </summary>
  <token key="ServiceWorkerEventType" variants="ServiceWorkerEventType"/>
</histogram>

<histogram name="ServiceWorker.StartWorker.Time" units="ms"
    expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken to start a Service Worker that is already installed, from
    process allocation to ACK of started from the renderer (which occurs after
    script execution). The metric is not recorded if DevTools was ever attached
    to the Service Worker during startup. See also
    ServiceWorker.StartNewWorker.Time for new workers.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartWorker.Timeout.StartPurpose"
    enum="ServiceWorkerMetrics.EventType" expires_after="2024-11-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the start purpose for a service worker that timed out while starting
    up. Recorded only for installed workers.

    This histogram was expired between approximately Feb through Sep 2021.
  </summary>
</histogram>

<histogram name="ServiceWorker.StartWorker.TimeoutPhase"
    enum="EmbeddedWorkerStartingPhase" expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The phase the ServiceWorker was in when ServiceWorker startup timed out.

    This histogram was expired between approximately Feb through Sep 2021.
  </summary>
</histogram>

<histogram name="ServiceWorker.StaticRouter.{Resource}.CacheStorageError"
    enum="CacheStorageErrorType" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the cache storage error when the cache source is set by a rule for
    the ServiceWorker static routing API and the cache storage match call
    returns a status instead of a result. This metric is recorded for
    {Resource}.
  </summary>
  <token key="Resource">
    <variant name="MainResource" summary="main resource"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
</histogram>

<histogram name="ServiceWorker.Storage.DeleteAndStartOverResult"
    enum="ServiceWorkerDeleteAndStartOverResult" expires_after="2024-08-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records result of storage recovery operations in ServiceWorkerStorage.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.Storage.FindForClientUrlInDB.ScopeCountForStorageKey"
    units="count" expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The scope count for a given StorageKey. This is recorded when
    ServiceWorkerStorage::FindForClientUrlInDB() function is called.
  </summary>
</histogram>

<histogram name="ServiceWorker.Storage.FindForClientUrlInDB.Time" units="ms"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of ServiceWorkerStorage::FindForClientUrlInDB which is used
    by FindRegistrationForClientUrl.
  </summary>
</histogram>

<histogram name="ServiceWorker.Storage.PurgeResourceResult"
    enum="NetErrorCodes" expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records successes and failures of purging a stale resource in
    ServiceWorkerStorage.
  </summary>
</histogram>

<histogram name="ServiceWorker.Storage.ReadInitialDataFromDB.Time" units="ms"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Execution time of ServiceWorkerStorage::ReadInitialDataFromDB which reads
    RegisteredStorageKey from a database.
  </summary>
</histogram>

<histogram
    name="ServiceWorker.Storage.RegisteredStorageKeyCacheInitialization.Time"
    units="ms" expires_after="2024-12-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The cache creation time of service worker registration key on UI thread.
    Includes asynchronous call, thread hopping and the time of
    ServiceWorker.Storage.ReadInitialDataFromDB.Time.
  </summary>
</histogram>

<histogram name="ServiceWorker.Storage.RetryCountForRecovery" units="retries"
    expires_after="2024-12-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The counts of retries to recover after a Storage Service crash. Logged after
    a recovery, or the maximum number of retries is exceeded. See
    ServiceWorkerRegistry::OnRemoteStorageDisconnected() for the maximum number
    of retries.
  </summary>
</histogram>

<histogram name="ServiceWorker.Subresource.Fallbacked.Type2"
    enum="ResourceType" expires_after="2024-12-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Type of subresources that is controlled with a service worker, but did not
    handled by a service worker (i.e. did not get replied via respondWith). This
    metric is taken every time a subresource load finishes.

    See ServiceWorker.Subresource.Handled.Type for handled cases.
  </summary>
</histogram>

<histogram name="ServiceWorker.Subresource.Handled.Type2" enum="ResourceType"
    expires_after="2024-12-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Type of subresources that is controlled with a service worker, and handled
    by a service worker (i.e. get replied via respondWith). This metric is taken
    every time a subresource load finishes.

    See ServiceWorker.Subresource.Fallbacked.Type for fallbacked cases.
  </summary>
</histogram>

<histogram name="ServiceWorker.UpdateResourceSha256ChecksumsResult"
    enum="ServiceWorkerStatusCode" expires_after="2024-12-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result of the checksum update operation. Each ServiceWorker resource
    should have a sha256 cehcksum hash string in the database, and that will be
    updated when there is a change in ServiceWorker scripts, or the field is
    empty.
  </summary>
</histogram>

<histogram name="ServiceWorker.WorkaroundForCrBug1342408Applied" units="cases"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    True if the workaround for crbug.com/1342408 has been applied. Otherwise,
    false. The workaround is applied when the response stream call back is
    called.

    This information is used to understand if we need to continue this
    workaround or not.
  </summary>
</histogram>

<histogram name="ServiceWorker.{operation}Time" units="ms"
    expires_after="2023-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time taken to query the content settings in the browser process for the
    {operation} operation. This is recorded each time a sync call is made.
  </summary>
  <token key="operation">
    <variant name="AllowCacheStorage"/>
    <variant name="AllowIndexedDB"/>
    <variant name="AllowWebLocks"/>
    <variant name="RequestFileSystemAccess"/>
  </token>
</histogram>

<histogram name="ServiceWorkerCache.Cache.Browser.Match.Initialized" units="ms"
    expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time to perform a 'match' operation on a given Cache when that cache is
    known to be fully initialized. This includes measurements for hits, misses,
    and errors.
  </summary>
</histogram>

<histogram name="ServiceWorkerCache.Cache.Browser.Match.RelatedFetchEvent"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time to perform a 'match' operation on a given Cache when the operation
    was initiated from a service worker currently processing a FetchEvent with a
    matching request URL. This includes measurements for hits, misses, and
    errors.
  </summary>
</histogram>

<histogram
    name="ServiceWorkerCache.Cache.{ServiceWorkerCacheProcessType}.Match.{MatchType}"
    units="ms" expires_after="2024-12-29">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram for the ServiceWorker Cache API. {MatchType} This histogram was
    temporarily disabled from M96 through early 12/2021.
  </summary>
  <token key="ServiceWorkerCacheProcessType"
      variants="ServiceWorkerCacheProcessType"/>
  <token key="MatchType">
    <variant name="Hit"
        summary="The time to perform a 'match' operation on a given Cache
                 that successfully results in a Response."/>
    <variant name="IgnoreSearch"
        summary="The time to perform a 'match' operation on a given Cache
                 with the 'ignoreSearch' option set. This includes
                 measurements for hits, misses, and errors."/>
    <variant name="Miss"
        summary="The time to perform a 'match' operation on a given Cache
                 that completes successfully, but does not find a matching
                 entry."/>
  </token>
</histogram>

<histogram
    name="ServiceWorkerCache.Cache.{ServiceWorkerCacheProcessType}.{ProcessOps}"
    units="ms" expires_after="2024-12-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram for the ServiceWorker Cache API. {ProcessOps} This histogram was
    temporarily disabled from M96 through early 12/2021.
  </summary>
  <token key="ServiceWorkerCacheProcessType"
      variants="ServiceWorkerCacheProcessType"/>
  <token key="ProcessOps">
    <variant name="DeleteOne"
        summary="The time to delete a single Request/Response entry from a
                 Cache. This measurement includes times for both existing or
                 non-existant entries."/>
    <variant name="Keys"
        summary="The time to perform the 'keys' operation on a given Cache.
                 This includes measurements for both invocations targeting
                 all entries or only entries for a specific request
                 parameter."/>
    <variant name="Match"
        summary="The time to perform a 'match' operation on a given Cache.
                 This includes measurements for all invocations, including
                 hits, misses, errors, etc."/>
    <variant name="MatchAll"
        summary="The time to perform a 'matchAll' operation on a given Cache.
                 This includes measurements for all invocations, including
                 hits, misses, and errors. In addition requests for all Cache
                 entries and for specific request params are included
                 together in this histogram."/>
    <variant name="PutMany"
        summary="The time to put a multiple Request/Response entries into a
                 given Cache. This may or may not include deleting existing
                 entries that match any of the Requests. This includes
                 measurements for both successes and failures."/>
    <variant name="PutOne"
        summary="The time to put a single Request/Response entry into a given
                 Cache. This may or may not include deleting an existing
                 entry matching the Request. This includes measurements for
                 both successes and failures."/>
  </token>
</histogram>

<histogram
    name="ServiceWorkerCache.CacheStorage.{ServiceWorkerCacheProcessType}.{ProcessOps}"
    units="ms" expires_after="2024-12-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram for the ServiceWorker Cache API. {ProcessOps} This histogram was
    temporarily disabled from M96 through early 12/2021.
  </summary>
  <token key="ServiceWorkerCacheProcessType"
      variants="ServiceWorkerCacheProcessType"/>
  <token key="ProcessOps">
    <variant name="Delete"
        summary="The time to 'delete' a Cache from the origin's CacheStorage.
                 If the Cache is still in use then the actual deletion may be
                 deferred until the last reference is dropped. Additional
                 time due to deferral is not included in this measurement."/>
    <variant name="Has"
        summary="The time to perform the 'has' operation on the origin's
                 CacheStorage."/>
    <variant name="Keys"
        summary="The time to perform the 'keys' operation on the origin's
                 CacheStorage."/>
    <variant name="MatchAllCaches"
        summary="The time to perform a 'match' operation against all caches
                 associated with the origin's CacheStorage. This histogram
                 includes measurements for hits, misses, and errors."/>
    <variant name="MatchOneCache"
        summary="The time to perform a 'match' operation against a single
                 cache associated with the origin's CacheStorage. This
                 histogram includes measurements for hits, misses, and
                 errors."/>
    <variant name="Open"
        summary="The time to 'open' a Cache in the origin's CacheStorage.
                 Some opening operations may happen asynchronously after the
                 'open' returns a Cache object. That deferred asynchronous
                 work is not included in this measurement."/>
  </token>
</histogram>

<histogram name="ServiceWorkerCache.ErrorStorageType"
    enum="CacheStorageErrorStorageType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records where the generic kErrorStorage value is triggered within the
    cache_storage code. This histogram was temporarily disabled from late
    10/2021 to early 12/2021.
  </summary>
</histogram>

<histogram name="ServiceWorkerCache.ListOriginsIndexValidity"
    enum="CacheStorageIndexResult" expires_after="2025-05-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The result from parsing and validating the index protobuf while calculating
    the list of cache_storage origins.
  </summary>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheClientType}.Scheduler.OperationDuration2"
    units="ms" expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when an operation is started until it completes. This
    histogram differs from the old OperationDuration in that it uses a different
    bucket size to measure longer values.
  </summary>
  <token key="ServiceWorkerCacheClientType"
      variants="ServiceWorkerCacheClientType"/>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheClientType}.Scheduler.QueueDuration2"
    units="ms" expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when an operation is started until it completes. This
    histogram differs from the old OperationDuration in that it uses a different
    bucket size to measure longer values.
  </summary>
  <token key="ServiceWorkerCacheClientType"
      variants="ServiceWorkerCacheClientType"/>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheClientType}.Scheduler.QueueLength"
    units="operations" expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of operations in the scheduling queue just before enqueuing a new
    operation.
  </summary>
  <token key="ServiceWorkerCacheClientType"
      variants="ServiceWorkerCacheClientType"/>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheSchedulerOpClientType}.Scheduler.OperationDuration2.{ServiceWorkerSchedulerOp}"
    units="ms" expires_after="2025-05-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when an operation is started until it completes for the
    {ServiceWorkerCacheSchedulerOpClientType} instance.
  </summary>
  <token key="ServiceWorkerCacheSchedulerOpClientType"
      variants="ServiceWorkerCacheSchedulerOpClientType"/>
  <token key="ServiceWorkerSchedulerOp" variants="ServiceWorkerSchedulerOp"/>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheSchedulerOpClientType}.Scheduler.QueueDuration2.{ServiceWorkerSchedulerOp}"
    units="ms" expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when an operation is started until it completes for the
    {ServiceWorkerCacheSchedulerOpClientType} instance.
  </summary>
  <token key="ServiceWorkerCacheSchedulerOpClientType"
      variants="ServiceWorkerCacheSchedulerOpClientType"/>
  <token key="ServiceWorkerSchedulerOp" variants="ServiceWorkerSchedulerOp"/>
</histogram>

<histogram
    name="ServiceWorkerCache.{ServiceWorkerCacheSchedulerOpClientType}.Scheduler.QueueLength.{ServiceWorkerSchedulerOp}"
    units="operations" expires_after="2025-03-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of operations in the scheduling queue just before enqueuing a new
    operation for the {ServiceWorkerCacheSchedulerOpClientType} instance.
  </summary>
  <token key="ServiceWorkerCacheSchedulerOpClientType"
      variants="ServiceWorkerCacheSchedulerOpClientType"/>
  <token key="ServiceWorkerSchedulerOp" variants="ServiceWorkerSchedulerOp"/>
</histogram>

<histogram name="Worker.TopLevelScript.FetchClassicScriptTime" units="ms"
    expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when a dedicated worker starts to fetch a classic script
    until the script starts to be evaluated. The value can only be taken for
    PlzDedicatedWorker.
  </summary>
</histogram>

<histogram name="Worker.TopLevelScript.Initialization2GlobalScopeCreation"
    units="ms" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when a worker thread initialization starts until the
    dedicated worker global scope is going to be made. This does not include the
    global scope creation time. Unfortunately, this does not measure a time from
    worker thread creation. It just measures from when the initialization
    starts.
  </summary>
</histogram>

<histogram name="Worker.TopLevelScript.LoadStartedTime" units="ms"
    expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when a dedicated worker starts until the script load
    started. This includes PlzDedicatedWorker to offload starting to fetch a
    script in the browser process. However, fetching contents are excluded from
    this time.
  </summary>
</histogram>

<histogram name="Worker.TopLevelScript.StartToWorkerScriptFetchFinishedTime"
    units="ms" expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time in ms from when a dedicated worker starts until the worker script
    fetch finished. This includes PlzDedicatedWorker to offload starting to
    fetch a script in the browser process. It does not include the initial
    evaluation of the script.
  </summary>
</histogram>

</histograms>

</histogram-configuration>