<!--
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 Chrome DWA metrics
along with a detailed description for each metric.

Events may be marked with the attribute singular="True" to indicate that
the event will only occur once per source, and multiple entries will just
be describing additional metrics about the same event.
-->

<dwa-configuration>

<event name="BrowsingTopics.Result">
  <owner>yaoxia@chromium.org</owner>
  <owner>jkarlin@chromium.org</owner>
  <summary>
    Records the result of a Topics API call. Recorded only when the call is
    successful (e.g., after the attestation check has passed). The DWA content
    key for this event corresponds to the caller's origin.
  </summary>
  <metric name="RealTopicCount">
    <summary>
      The number of true, observed topics included in the result (excluding
      randomly padded topics).
    </summary>
  </metric>
</event>

<event name="DwaTestMetric">
  <owner>zhouzj@google.com</owner>
  <summary>
    A test DWA metric.
  </summary>
  <study name="ACTStudy"/>
  <study name="LegacyStudy" expires_after="M135"/>
  <study name="ModeBStudy"/>
  <metric name="HasVideo" enum="Boolean">
    <summary>
      True if the page contains a video.
    </summary>
  </metric>
  <metric name="Latency" expires_after="2025-07-25">
    <summary>
      The latency in ms.
    </summary>
  </metric>
</event>

<event name="SharedStorage.RunFinishedInWorklet">
  <owner>yaoxia@google.com</owner>
  <owner>cammie@google.com</owner>
  <summary>
    Records the completion of the `run()` method execution within a Shared
    Storage worklet. Only recorded upon successful execution and does not
    capture early errors.
  </summary>
  <metric name="TimeInWorklet">
    <summary>
      The time, in milliseconds, that the `run()` method took to execute within
      the Shared Storage worklet.
    </summary>
  </metric>
</event>

<event name="SharedStorage.SelectUrlFinishedInWorklet">
  <owner>yaoxia@google.com</owner>
  <owner>cammie@google.com</owner>
  <summary>
    Records the completion of the `selectURL()` method execution within a Shared
    Storage worklet. Only recorded upon successful execution and does not
    capture early errors.
  </summary>
  <metric name="TimeInWorklet">
    <summary>
      The time, in milliseconds, that the `selectURL()` method took to execute
      within the Shared Storage worklet.
    </summary>
  </metric>
</event>

<event name="StorageAccess.RequestOutcome">
  <owner>selya@google.com</owner>
  <owner>cfredric@chromium.org</owner>
  <metric name="Outcome" enum="StorageAccessAPIRequestOutcome">
    <summary>
      Records the outcome of a particular Storage Access API permission request
      and the site that requested it.

      Recorded at the time of the request, for every request.
    </summary>
  </metric>
</event>

</dwa-configuration>
