diff options
| author | 2020-10-27 18:25:55 +0000 | |
|---|---|---|
| committer | 2020-11-06 11:10:07 +0000 | |
| commit | b3860abebdeb5a3daa4e875105ff8ae5fbfee4c9 (patch) | |
| tree | 67aa13b0225f6abf4db21f74bdfcc02f4681bd49 | |
| parent | 5aebb037a3a11f000376ea91b93d40984dd5a364 (diff) | |
Add an atom to log TextClassifier API latency and result
Bug: 169042373
Test: m TextClassifierService
Merged-In: If37cfefbc0e0714acc698ecb3bbd54a51b052e28
Change-Id: If37cfefbc0e0714acc698ecb3bbd54a51b052e28
(cherry picked from commit 7a22ac45769b81113ad8af626e5591c3b9ffea79)
| -rw-r--r-- | cmds/statsd/src/atoms.proto | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index aba1613134d0..fa68b790328b 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -488,6 +488,8 @@ message Atom { MediametricsMediaParserReported mediametrics_mediaparser_reported = 316; + TextClassifierApiUsageReported text_classifier_api_usage_reported = 318 [(module) = "textclassifier"]; + // StatsdStats tracks platform atoms with ids upto 500. // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value. } @@ -11245,3 +11247,29 @@ message BlobInfo { // List of leasees of this Blob optional BlobLeaseeListProto leasees = 5; } + +/** + * Logs when a TextClassifier API is invoked. + * + * See frameworks/base/core/java/android/view/textclassifier/TextClassifier.java + * Logged from: external/libtextclassifier/java/ + */ +message TextClassifierApiUsageReported { + enum ApiType { + UNKNOWN_API = 0; + SUGGEST_SELECTION = 1; + CLASSIFY_TEXT = 2; + GENERATE_LINKS = 3; + DETECT_LANGUAGES = 4; + SUGGEST_CONVERSATION_ACTIONS = 5; + } + optional ApiType api_type = 1; + + enum ResultType { + UNKNOWN_RESULT = 0; + SUCCESS = 1; + FAIL = 2; + } + optional ResultType result_type = 2; + optional int64 latency_millis = 3; +} |