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

<!--
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 WebNN 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="WebNNCoreMLActions">
  <variant name="CompiledModelLoad"
      summary="Time to load the compiled .mlmodelc file."/>
  <variant name="MLModelCompile"
      summary="Time to compile the generated .mlmodel file."/>
  <variant name="MLModelTranslate"
      summary="Time to translate from webnn graph to CoreML representation
               and serializes to disk."/>
  <variant name="MLModelWrite"
      summary="Time to write the temporary .mlmodel file."/>
  <variant name="MLWeightsWrite"
      summary="Time to write the temporary weights.bin file."/>
  <variant name="ModelOutputRead"
      summary="Time it took to read back the inference results."/>
  <variant name="ModelPredict"
      summary="Time predictionFromFeatures took when calling compute()."/>
  <variant name="ModelPredictWithDispatch"
      summary="Time predictionFromFeatures took when calling dispatch()."/>
</variants>

<variants name="WebNNDMLActions">
  <variant name="Compilation" summary="Time to compile the DirectML graph."/>
</variants>

<histogram name="WebNN.CoreML.TimingMs.{WebNNCoreMLActions}" units="ms"
    expires_after="2025-02-26">
  <owner>[email protected]</owner>
  <owner>src/services/webnn/OWNERS</owner>
  <summary>
    The time taken to perform a WebNN CoreML action. This includes model
    creation, model compilation, and model inference.
  </summary>
</histogram>

<histogram name="WebNN.DML.TimingMs.{WebNNDMLActions}" units="ms"
    expires_after="2025-06-27">
  <owner>[email protected]</owner>
  <owner>src/services/webnn/OWNERS</owner>
  <summary>
    The time taken to perform a WebNN DML action. This includes model
    compilation.
  </summary>
</histogram>

</histograms>

</histogram-configuration>