Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a48c25b authored by Myles Watson's avatar Myles Watson
Browse files

Move HCI Timeout metric before final timeout

Bug: 330226051
Test: atest bluetooth_test_gd_unit
Flag: EXEMPT, logging/metric ordering change
Change-Id: I33e93e18c669922b431f2fd4d1c302cae5bc2aba
parent 2e4b86a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ static void fail_if_reset_complete_not_success(CommandCompleteView complete) {
}

static void abort_after_time_out(OpCode op_code) {
  bluetooth::os::LogMetricHciTimeoutEvent(static_cast<uint32_t>(op_code));
  ASSERT_LOG(false, "Done waiting for debug information after HCI timeout (%s)", OpCodeText(op_code).c_str());
}

@@ -272,7 +271,8 @@ struct HciLayer::impl {
  void on_hci_timeout(OpCode op_code) {
    common::StopWatch::DumpStopWatchLog();
    log::error("Timed out waiting for 0x{:02x} ({})", op_code, OpCodeText(op_code));
    // TODO: LogMetricHciTimeoutEvent(static_cast<uint32_t>(op_code));

    bluetooth::os::LogMetricHciTimeoutEvent(static_cast<uint32_t>(op_code));

    log::error("Flushing {} waiting commands", command_queue_.size());
    // Clear any waiting commands (there is an abort coming anyway)