More diagnostics for slow operations
- Add more watchdogs and more context to metrics retrieval.
- Log first alias when too many keys are listed.
- Drop a couple of superfluous comments.
Bug: 319563050
Bug: 380879713
Test: adb logcat on device with large number of keys
Change-Id: I5484b131e45c5fc1d39810f26104db46cb7aae7a
diff --git a/keystore2/src/metrics.rs b/keystore2/src/metrics.rs
index 4757739..b884809 100644
--- a/keystore2/src/metrics.rs
+++ b/keystore2/src/metrics.rs
@@ -51,7 +51,7 @@
impl IKeystoreMetrics for Metrics {
fn pullMetrics(&self, atom_id: AtomID) -> BinderResult<Vec<KeystoreAtom>> {
- let _wp = wd::watch("IKeystoreMetrics::pullMetrics");
+ let _wp = wd::watch_millis_with("IKeystoreMetrics::pullMetrics", 500, atom_id);
self.pull_metrics(atom_id).map_err(into_logged_binder)
}
}