summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2018-01-18 15:21:36 -0800
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-02-08 04:11:09 +0000
commit7cad2e507fecb502d8bac4e1194bf3153f3c74e6 (patch)
tree494a6bfc41fb08cc2ece72e8739713c9cd8b6684
parentd88103dbae9b97ba526e4b7813a943904af45d04 (diff)
downloadbase-7cad2e507fecb502d8bac4e1194bf3153f3c74e6.tar.gz
Fixed AUTOFILL_UI_LATENCY metric.
This metric was using the RESERVED_FOR_LOGBUILDER_COUNTER and hence was not being picked up. Bug: 71863561 Fixes: 72175011 Test: adb shell logcat -b events | grep sysui | grep 1136 Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases Change-Id: I34f701ff5336a413477fd14172d16d8d1e5403ad (cherry picked from commit b659adb3f3d13049ca1c08fcec2d419ffd7a386b)
-rw-r--r--proto/src/metrics_constants.proto6
-rw-r--r--services/autofill/java/com/android/server/autofill/Session.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index cb7d8730e9bf..a27515c0266d 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -4532,7 +4532,8 @@ message MetricsEvent {
// OS: O MR
AUTOFILL_SERVICE_DISABLED_SELF = 1135;
- // Counter showing how long it took (in ms) to show the autofill UI after a field was focused
+ // Reports how long it took to show the autofill UI after a field was focused
+ // Tag FIELD_AUTOFILL_DURATION: Duration in ms
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
// Package: Package of the autofill service
// OS: O MR
@@ -4571,6 +4572,9 @@ message MetricsEvent {
// logged when we cancel an app transition.
APP_TRANSITION_CANCELLED = 1144;
+ // Tag of a field representing a duration on autofill-related metrics.
+ FIELD_AUTOFILL_DURATION = 1145;
+
// ---- End O-MR1 Constants, all O-MR1 constants go above this line ----
// ACTION: Stop an app and turn on background check
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 905db6734a73..de2950dd5985 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -1387,7 +1387,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
mUiLatencyHistory.log(historyLog.toString());
final LogMaker metricsLog = newLogMaker(MetricsEvent.AUTOFILL_UI_LATENCY)
- .setCounterValue((int) duration);
+ .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, duration);
mMetricsLogger.write(metricsLog);
}
}