<!--
Copyright 2021 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 Power 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="BuiltinModelName">
<!-- Built-in with common TFLite-related histograms -->
<variant name="SmartDimModel"/>
<variant name="TestModel"/>
</variants>
<variants name="PerformanceMetricsRequestName">
<!-- ML Service Mojo requests for which standard performance histograms are
gathered using RequestMetrics -->
<variant name="DocumentScanner.DetectCornersFromJPEG"/>
<variant name="DocumentScanner.DetectCornersFromNV12"/>
<variant name="DocumentScanner.DoPostProcessing"/>
<variant name="DocumentScanner.LoadModelResult"/>
<variant name="HandwritingModel.LoadModelResult"/>
<variant name="HandwritingModel.Recognize"/>
<variant name="ImageAnnotator.AnnotateEncodedImage"/>
<variant name="ImageAnnotator.AnnotateRawImage"/>
<variant name="ImageAnnotator.LoadModelResult"/>
<variant name="SmartDimModel.CreateGraphExecutorResult"/>
<variant name="SmartDimModel.ExecuteResult"/>
<variant name="SmartDimModel.LoadModelResult"/>
<variant name="TestModel.CreateGraphExecutorResult"/>
<variant name="TestModel.ExecuteResult"/>
<variant name="TestModel.LoadModelResult"/>
<variant name="TextClassifier.Annotate"/>
<variant name="TextClassifier.FindLanguages"/>
<variant name="TextClassifier.LoadModelResult"/>
<variant name="TextClassifier.SuggestSelection"/>
<variant name="TextSuggester.LoadModelResult"/>
<variant name="TextSuggester.Suggest"/>
<variant name="WebPlatformHandwritingModel.GetPrediction"/>
<variant name="WebPlatformHandwritingModel.LoadModelResult"/>
<variant name="WebPlatformTfLiteFlatBufferModel.Compute"/>
<variant name="WebPlatformTfLiteFlatBufferModel.CreateModelLoaderResult"/>
<variant name="WebPlatformTfLiteFlatBufferModel.Load"/>
</variants>
<histogram name="MachineLearningService.CpuUsageMilliPercent"
units="1/1000ths of %" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Fraction of total CPU resources used by ChromeOS ML Service, sampled every 5
minutes.
</summary>
</histogram>
<histogram name="MachineLearningService.DocumentScanner.{RequestName}.Event"
enum="MachineLearningServiceDocumentScannerResultEvent"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of DocumentScanner.{RequestName} request, which can be OK or
ERROR.
</summary>
<token key="RequestName">
<variant name="DetectCornersFromJPEG"/>
<variant name="DetectCornersFromNV12"/>
<variant name="DoPostProcessing"/>
</token>
</histogram>
<histogram name="MachineLearningService.GrammarChecker.Check.Event"
enum="Boolean" expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>The result of grammar check, which can be OK or ERROR.</summary>
</histogram>
<histogram name="MachineLearningService.HandwritingModel.LoadModelResult.Event"
enum="MachineLearningServiceLoadHandwritingModelResultEvent"
expires_after="2024-10-28">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of load handwriting model, which can be OK or some specific
error. The error code could be logged in machine learning service in chrome
or in chromeos when handwriting model is not loaded successfully.
</summary>
</histogram>
<histogram name="MachineLearningService.HandwritingModel.Recognize.Event"
enum="Boolean" expires_after="2024-10-28">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of handwriting recognition, which can be OK or some specific
error.
</summary>
</histogram>
<histogram
name="MachineLearningService.HeatmapPalmRejection.ExecuteResult.Event"
enum="MachineLearningServiceExecuteResultEvent" expires_after="2025-01-17">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of heatmap palm rejection Execute request, which can be OK or
some specific error.
</summary>
</histogram>
<histogram
name="MachineLearningService.HeatmapPalmRejection.LoadModelResult.Event"
enum="MachineLearningServiceLoadHeatmapPalmRejectionResult"
expires_after="2025-01-17">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of load heatmap palm rejection module, which can be OK or some
specific error.
</summary>
</histogram>
<histogram name="MachineLearningService.LoadModelResult"
enum="MachineLearningServiceLoadModelResultEvent"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The error result of LoadModel in cases when the model name could not be
determined. See MachineLearningService.*.LoadModelResult.Event for the
result broken down by model name when the name is known.
</summary>
</histogram>
<histogram name="MachineLearningService.MlCore.DlcBeginInstallDlcServiceError"
enum="MachineLearningServiceDlcErrorCode" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The detailed error code received from DLC Service while trying to request to
install the ML Core DLC.
</summary>
</histogram>
<histogram name="MachineLearningService.MlCore.DlcBeginInstallResult"
enum="MachineLearningServiceDlcBeginInstallResult"
expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Result of an attempt to request DLC Service to begin installation of the ML
Core DLC. See the related histogram .DlcBeginInstallDlcServiceError for
detailed error codes returned from DLC Service.
</summary>
</histogram>
<histogram name="MachineLearningService.MlCore.DlcFinalInstallDlcServiceError"
enum="MachineLearningServiceDlcErrorCode" expires_after="2024-11-03">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The detailed error code received from DLC Service after a DLC State Change
notification from DLC Service, following a request to install the ML Core
DLC. "BUSY" code is considered non-final as retries are made in
this case.
</summary>
</histogram>
<histogram name="MachineLearningService.MlCore.DlcFinalInstallResult"
enum="MachineLearningServiceDlcFinalInstallResult"
expires_after="2024-11-03">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Final result of an attempt to install the ML Core DLC. See the related
histogram .DlcFinalInstallDlcServiceError for detailed error codes returned
from DLC Service.
</summary>
</histogram>
<histogram name="MachineLearningService.MlCore.DlcInstallAttemptCount"
units="attempts" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Indicates at least n attempts were made to install the ML Core DLC. Note
that the buckets are cumulative: If e.g. 3 attempts are made, then the
"1", "2", and "3" buckets will all be
incremented.
</summary>
</histogram>
<histogram name="MachineLearningService.MojoConnectionEvent"
enum="MachineLearningServiceMojoConnectionEvent" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Events related to the connection and disconnection of the Mojo IPC channel
between Chrome and the ChromeOS ML Service.
</summary>
</histogram>
<histogram name="MachineLearningService.NumWorkerProcess" units="count"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Number of worker processes registered in ml-service. Only used in ChromeOS.
Sampled every 5 minutes.
</summary>
</histogram>
<histogram name="MachineLearningService.PeakTotalMemoryKb" units="KB"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Peak total (shared and non-shared) memory used by ChromeOS ML Service over
the last 24 hours. Sampled every 5 minutes, so may miss short-lived spikes.
</summary>
</histogram>
<histogram name="MachineLearningService.ProcessError"
enum="MachineLearningServiceProcessError" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Process handling errors of ml-service. Emitted when there is error in
process handling. For example, "failed to spawning worker process"
etc. Only used in ChromeOS.
</summary>
</histogram>
<histogram name="MachineLearningService.ReapWorkerProcessErrno"
enum="MachineLearningServiceReapWorkerProcessErrno"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The "errno" of waitpid calls used by ml-service's control process
to reap the worker processes. This is only recorded when waitpid meets error
and should be rare. This is a ChromeOS only metric. And we only record the
corresponding enum values of "ECHILD", "EINTR" and
"EINVAL" because according to the man page of waitpid, they are
the only possible errno. All the other "errno" are treated as
"unknown" error.
</summary>
</histogram>
<histogram name="MachineLearningService.TextSuggester.Suggest.Event"
enum="BooleanError" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of a text suggester request, which can be OK or ERROR.
</summary>
</histogram>
<histogram name="MachineLearningService.TotalMemoryKb" units="KB"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Total (shared and non-shared) memory used by ChromeOS ML Service, sampled
every 5 minutes.
</summary>
</histogram>
<histogram
name="MachineLearningService.WebPlatformHandwritingModel.GetPrediction.Event"
enum="Boolean" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of Web platform handwriting recognition, which can be either OK
or Error.
</summary>
</histogram>
<histogram
name="MachineLearningService.WebPlatformHandwritingModel.LoadModelResult.Event"
enum="MachineLearningServiceLoadHandwritingModelResultEvent"
expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of load web platform handwriting model, which can be OK or some
specific error. The error code could be logged in machine learning service
in chrome or in chromeos when handwriting model is not loaded successfully.
</summary>
</histogram>
<histogram
name="MachineLearningService.WebPlatformTfLiteFlatBufferModel.Compute.Event"
enum="MachineLearningServiceWebPlatformTfLiteFlatBufferModelComputeEvent"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of compute/inference based on a web platform model loaded, which
can be OK or some specific error. The error code could be logged in machine
learning service in chromeos when the computation fails.
</summary>
</histogram>
<histogram
name="MachineLearningService.WebPlatformTfLiteFlatBufferModel.CreateModelLoaderResult.Event"
enum="MachineLearningServiceWebPlatformTfLiteFlatBufferModelCreateModelLoaderResultEvent"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of creating web platform model loader, which can be success or
some specific error. The error code could be logged in machine learning
service in chromeos when the model loader can not be created successfully.
</summary>
</histogram>
<histogram
name="MachineLearningService.WebPlatformTfLiteFlatBufferModel.Load.Event"
enum="MachineLearningServiceWebPlatformTfLiteFlatBufferModelLoadEvent"
expires_after="2024-11-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of loading a web platform model, which can be OK or some specific
error. The error code could be logged in machine learning service in
chromeos when model can not successfully loaded.
</summary>
</histogram>
<histogram name="MachineLearningService.WorkerProcessAcceptMojoConnectionTime"
units="microseconds" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The wall time used for the worker process to accept the mojo connection to
control process in ml-service. Only used in ChromeOS.
</summary>
</histogram>
<histogram name="MachineLearningService.WorkerProcessCleanUpTime"
units="microseconds" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The wall time used by the control process to reap and cleanup the worker
processes in ml-service. Only used in ChromeOS.
</summary>
</histogram>
<histogram name="MachineLearningService.WorkerProcessExitStatus"
units="exit status" expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The exit status of the worker processes of ml-service. Only used in Chrome
OS. This is only emitted when the worker process exits with non-zero status.
And theoretically, there can be 255 different types of status (from 1 to
255).
</summary>
</histogram>
<histogram
name="MachineLearningService.{ModelName}.CreateGraphExecutorResult.Event"
enum="MachineLearningServiceCreateGraphExecutorResultEvent"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of CreateGraphExecutor request for model {ModelName}, which can
be OK or some specific error.
</summary>
<token key="ModelName" variants="BuiltinModelName"/>
</histogram>
<histogram name="MachineLearningService.{ModelName}.ExecuteResult.Event"
enum="MachineLearningServiceExecuteResultEvent" expires_after="2024-12-30">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of Execute request for model {ModelName}, which can be OK or some
specific error.
</summary>
<token key="ModelName" variants="BuiltinModelName"/>
</histogram>
<histogram name="MachineLearningService.{ModelName}.LoadModelResult.Event"
enum="MachineLearningServiceLoadModelResultEvent"
expires_after="2025-03-01">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
The result of LoadModel request for model {ModelName}, which can be OK or
some specific error. Additional error information may be found in Chrome
logs or ml_service logs within ChromeOS logs.
</summary>
<token key="ModelName">
<variant name="DocumentScanner"/>
<variant name="GrammarChecker">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
</variant>
<variant name="ImageAnnotator"/>
<variant name="SmartDimModel"/>
<variant name="TestModel"/>
<variant name="TextClassifier"/>
<variant name="TextSuggester"/>
</token>
</histogram>
<histogram name="MachineLearningService.{RequestName}.CpuTimeMicrosec"
units="microseconds" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
CPU time (for one CPU core) of {RequestName} request. Reported for all
users; users without high-resolution clocks will report 0 for short
requests.
</summary>
<token key="RequestName" variants="PerformanceMetricsRequestName"/>
</histogram>
<histogram name="MachineLearningService.{RequestName}.TotalMemoryDeltaKb"
units="KB" expires_after="2025-01-05">
<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>Memory usage increase caused by {RequestName} request.</summary>
<token key="RequestName" variants="PerformanceMetricsRequestName"/>
</histogram>
</histograms>
</histogram-configuration>