[Autofill PCC Metrics]:Follow-up: add more metrics
Test: m
Bug: 265037574
Change-Id: I31e2435ed458acb537ed5fc56d7b10e51b815fc7
diff --git a/stats/atoms.proto b/stats/atoms.proto
index f3b7dfb..8cbbdb0 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -22110,6 +22110,9 @@
// The selection process of this dataset.
optional autofill.DatasetPickedReason selected_dataset_picked_reason = 27;
+
+ // Which detection was preferred
+ optional autofill.DetectionPreference detection_preference = 28;
}
// Tells how Autofill dataset was/will-be displayed.
diff --git a/stats/atoms/autofill/autofill_extension_atoms.proto b/stats/atoms/autofill/autofill_extension_atoms.proto
index f815875..f2dd4b8 100644
--- a/stats/atoms/autofill/autofill_extension_atoms.proto
+++ b/stats/atoms/autofill/autofill_extension_atoms.proto
@@ -99,7 +99,8 @@
// How the dataset is supposed to be shown to the user
optional AutofillDisplayPresentationType display_presentation_type = 4;
// Count of datasets that should've been available for display. If the request
- // times out, this won't be populated.
+ // times out, this won't be populated. This is the count after PCC detected
+ // datasets are processed and ineligeble datasets have been filtered off.
optional int32 available_count = 5;
optional int64 save_ui_trigger_ids = 6;
// Timestamp of when Autofill provider returns a FillResponse
@@ -121,15 +122,32 @@
// final eligible datasets to be shown.
optional int64 latency_response_processing_millis = 14;
- // Count of datasets that are available due to PCC Detection. These can include datasets
- // available via provider response, and would be eligible because of pcc too.
- // If PCC detection is preferred over Autofill provider, and Autofill provider had same detection
- // as PCC did, the following invariants would hold.
+ // Count of datasets that were provided by the Autofill Provider by
+ // specifying type. These datasets may additionally contain autofill ids for
+ // which this same dataset is applicable that are available due to PCC
+ // detection. These can include datasets available via provider response,
+ // and would be eligible because of PCC too.
+ // If PCC detection is preferred over Autofill Provider, it may include
+ // datasets applicable to autofill ids. So the same datasets would've shown
+ // if Autofill Provider detection was preferred.
+ // In such a case and if the detection of both the Autofill Provider and PCC
+ // detection were the same, the following invariants holds, provided same
+ // datasets were provided.
// available_pcc_count = available_count
// available_pcc_only_count = 0
+ // If PCC detection is not preferred, the following invariant holds.
+ // available_pcc_count = available_pcc_only_count
optional int32 available_pcc_count = 15;
- // Count of datasets that are available only due to PCC Detection.
+ // Count of datasets that are available only due to PCC Detection. These
+ // datasets are the ones provided by Autofill Provider by specifying types
+ // only. These datasets don't have any autofill id associated with them.
optional int32 available_pcc_only_count = 16;
+ // Count of datasets that are returned by the Autofill Provider. This count
+ // is before any filtering based on PCC detection is performed. This contains
+ // datasets set by both type and autofill ids.
+ optional int32 total_datasets_provided = 17;
+ // Which detection was preferred
+ optional DetectionPreference detection_preference = 18;
}
/**
diff --git a/stats/enums/autofill/enums.proto b/stats/enums/autofill/enums.proto
index 631fc7e..f671586 100644
--- a/stats/enums/autofill/enums.proto
+++ b/stats/enums/autofill/enums.proto
@@ -120,3 +120,11 @@
PICK_REASON_PCC_DETECTION_ONLY = 4;
PICK_REASON_PCC_DETECTION_PREFERRED_WITH_PROVIDER = 5;
}
+
+// Enum for specifying which detection provider gets the preference when choosing
+// final datasets.
+enum DetectionPreference {
+ DETECTION_PREFER_UNKONWN = 0;
+ DETECTION_PREFER_AUTOFILL_PROVIDER = 1;
+ DETECTION_PREFER_PCC = 2;
+}
\ No newline at end of file