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

Commit 8679684c authored by Jeremy Wu's avatar Jeremy Wu Committed by Gerrit Code Review
Browse files

Merge "Floss: metrics: extend hfp pkt loss metrics for LC3" into main

parents 81dfc82f fd4a4fca
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -177,7 +177,8 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int
}

void LogMetricHfpPacketLossStats(
    const Address& address, int num_decoded_frames, double packet_loss_ratio) {}
    const Address& address, int num_decoded_frames, double packet_loss_ratio, uint16_t codec_type) {
}

void LogMetricReadRssiResult(const Address& address, uint16_t handle, uint32_t cmd_status, int8_t rssi) {
  int metric_id = 0;
+5 −3
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ void LogMetricA2dpAudioOverrunEvent(
}

void LogMetricHfpPacketLossStats(
    const Address& address, int num_decoded_frames, double packet_loss_ratio) {
    const Address& address, int num_decoded_frames, double packet_loss_ratio, uint16_t codec_type) {
  std::string boot_id;
  std::string addr_string;

@@ -95,17 +95,19 @@ void LogMetricHfpPacketLossStats(
  addr_string = address.ToString();

  LOG_DEBUG(
      "HfpPacketLoss: %s, %s, %d, %f",
      "HfpPacketLoss: %s, %s, %d, %f, %u",
      boot_id.c_str(),
      addr_string.c_str(),
      num_decoded_frames,
      packet_loss_ratio);
      packet_loss_ratio,
      codec_type);

  ::metrics::structured::events::bluetooth::BluetoothHfpPacketLoss()
      .SetBootId(boot_id)
      .SetDeviceId(addr_string)
      .SetDecodedFrames(num_decoded_frames)
      .SetPacketLossRatio(packet_loss_ratio)
      .SetCodecType(codec_type)
      .Record();
}

+2 −1
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ void LogMetricA2dpAudioOverrunEvent(
    int num_dropped_encoded_bytes) {}

void LogMetricHfpPacketLossStats(
    const Address& address, int num_decoded_frames, double packet_loss_ratio) {}
    const Address& address, int num_decoded_frames, double packet_loss_ratio, uint16_t codec_type) {
}

void LogMetricReadRssiResult(const Address& address, uint16_t handle, uint32_t cmd_status, int8_t rssi) {}

+2 −1
Original line number Diff line number Diff line
@@ -101,7 +101,8 @@ void LogMetricSmpPairingEvent(
void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int audio_coding_mode) {}

void LogMetricHfpPacketLossStats(
    const Address& address, int num_decoded_frames, double packet_loss_ratio) {}
    const Address& address, int num_decoded_frames, double packet_loss_ratio, uint16_t codec_type) {
}

void LogMetricBluetoothHalCrashReason(
    const Address& address, uint32_t error_code, uint32_t vendor_error_code) {}
+5 −1
Original line number Diff line number Diff line
@@ -127,9 +127,13 @@ void LogMetricA2dpPlaybackEvent(const hci::Address& address, int playback_state,
 * @param address HFP device associated with this stats
 * @param num_decoded_frames number of decoded frames
 * @param packet_loss_ratio ratio of packet loss frames
 * @param codec_type codec type of the packet (mSBC=2, LC3=3)
 */
void LogMetricHfpPacketLossStats(
    const hci::Address& address, int num_decoded_frames, double packet_loss_ratio);
    const hci::Address& address,
    int num_decoded_frames,
    double packet_loss_ratio,
    uint16_t codec_type);

/**
 * Log read RSSI result
Loading