summaryrefslogtreecommitdiff
path: root/system/common/metrics.cc
diff options
context:
space:
mode:
author Jack He <siyuanh@google.com> 2019-01-20 23:16:45 -0800
committer Jack He <siyuanh@google.com> 2019-01-29 18:20:03 -0800
commit0e818cf92594cd31ca8ebe64cf1692d2c82c6fb2 (patch)
tree777353271b0556a79fba77954bb74a9dbdf389b0 /system/common/metrics.cc
parent69d75b47326042598208fa6609bcfe9dd0878db9 (diff)
Metrics: Log HCI timeout event over stats log
Fixes: 121213292 Bug: 111812273 Test: make, test drive with statsd Change-Id: I9bab0078a1e45c9811fd63f4c5aef9f4704ac555
Diffstat (limited to 'system/common/metrics.cc')
-rw-r--r--system/common/metrics.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/common/metrics.cc b/system/common/metrics.cc
index 976b5cfa5d..40606d32d9 100644
--- a/system/common/metrics.cc
+++ b/system/common/metrics.cc
@@ -597,6 +597,16 @@ void LogLinkLayerConnectionEvent(const RawAddress* address,
}
}
+void LogHciTimeoutEvent(uint32_t hci_cmd) {
+ int ret =
+ android::util::stats_write(android::util::BLUETOOTH_HCI_TIMEOUT_REPORTED,
+ static_cast<int64_t>(hci_cmd));
+ if (ret < 0) {
+ LOG(WARNING) << __func__ << ": failed for opcode " << loghex(hci_cmd)
+ << ", error " << ret;
+ }
+}
+
} // namespace common
} // namespace bluetooth