Loading system/bta/le_audio/metrics_collector_test.cc +12 −12 Original line number Diff line number Diff line Loading @@ -58,17 +58,17 @@ std::vector<int32_t> last_streaming_context_type; namespace bluetooth { namespace common { void LogLeAudioConnectionSessionReported(int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, std::vector<int64_t>& device_connecting_offset_nanos, std::vector<int64_t>& device_connected_offset_nanos, std::vector<int64_t>& device_connection_duration_nanos, std::vector<int32_t>& device_connection_status, std::vector<int32_t>& device_disconnection_status, std::vector<RawAddress>& device_address, std::vector<int64_t>& streaming_offset_nanos, std::vector<int64_t>& streaming_duration_nanos, std::vector<int32_t>& streaming_context_type) { void LogLeAudioConnectionSessionReported( int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, const std::vector<int64_t>& device_connecting_offset_nanos, const std::vector<int64_t>& device_connected_offset_nanos, const std::vector<int64_t>& device_connection_duration_nanos, const std::vector<int32_t>& device_connection_status, const std::vector<int32_t>& device_disconnection_status, const std::vector<RawAddress>& device_address, const std::vector<int64_t>& streaming_offset_nanos, const std::vector<int64_t>& streaming_duration_nanos, const std::vector<int32_t>& streaming_context_type) { log_count++; last_group_size = group_size; last_group_metric_id = group_metric_id; Loading system/common/Android.bp +0 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ cc_library_static { "libbt-platform-protos-lite", "libbt_shim_bridge", ], cflags: ["-Wno-unused-parameter"], } cc_test { Loading Loading @@ -118,7 +117,6 @@ cc_test { cfi: false, }, header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], } cc_test { Loading Loading @@ -149,7 +147,6 @@ cc_test { "libosi", ], header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], } cc_benchmark { Loading Loading @@ -177,5 +174,4 @@ cc_benchmark { "libosi", ], header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], } system/common/benchmark/thread_performance_benchmark.cc +3 −3 Original line number Diff line number Diff line Loading @@ -48,15 +48,15 @@ void pthread_callback_batch(void* context) { } } void callback_sequential(void* context) { g_counter_promise->set_value(); } void callback_sequential(void* /* context */) { g_counter_promise->set_value(); } void callback_sequential_queue(fixed_queue_t* queue, void* context) { void callback_sequential_queue(fixed_queue_t* queue, void* /* context */) { bluetooth::log::assert_that(queue != nullptr, "assert failed: queue != nullptr"); fixed_queue_dequeue(queue); g_counter_promise->set_value(); } void callback_batch(fixed_queue_t* queue, void* data) { void callback_batch(fixed_queue_t* queue, void* /* data */) { bluetooth::log::assert_that(queue != nullptr, "assert failed: queue != nullptr"); fixed_queue_dequeue(queue); g_counter++; Loading system/common/message_loop_thread_unittest.cc +2 −2 Original line number Diff line number Diff line Loading @@ -324,10 +324,10 @@ TEST_F(MessageLoopThreadTest, test_post_twice) { int counter = 0; message_loop_thread.StartUp(); message_loop_thread.Post(base::BindOnce( [](MessageLoopThread* thread, int* counter) { ASSERT_EQ((*counter)++, 0); }, [](MessageLoopThread* /* thread */, int* counter) { ASSERT_EQ((*counter)++, 0); }, &message_loop_thread, &counter)); message_loop_thread.Post(base::BindOnce( [](MessageLoopThread* thread, int* counter) { ASSERT_EQ((*counter)++, 1); }, [](MessageLoopThread* /* thread */, int* counter) { ASSERT_EQ((*counter)++, 1); }, &message_loop_thread, &counter)); message_loop_thread.ShutDown(); ASSERT_EQ(counter, 2); Loading system/common/metrics.cc +18 −21 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ * ******************************************************************************/ #include "metrics.h" #include "common/metrics.h" #include <base/base64.h> #include <bluetooth/log.h> Loading @@ -26,24 +26,21 @@ #include <unistd.h> #include <algorithm> #include <array> #include <cerrno> #include <cstdint> #include <cstring> #include <memory> #include <mutex> #include <mutex> // NOLINT #include <utility> #include "address_obfuscator.h" #include "bluetooth/metrics/bluetooth.pb.h" #include "common/address_obfuscator.h" #include "common/leaky_bonded_queue.h" #include "common/time_util.h" #include "hci/address.h" #include "internal_include/bt_trace.h" #include "leaky_bonded_queue.h" #include "main/shim/metric_id_api.h" #include "metric_id_allocator.h" #include "metrics/metrics_state.h" #include "os/metrics.h" #include "osi/include/osi.h" #include "time_util.h" #include "types/raw_address.h" namespace fmt { Loading Loading @@ -391,7 +388,7 @@ void BluetoothMetricsLogger::LogBluetoothSessionDeviceInfo(uint32_t device_class } DeviceInfo* info = pimpl_->bluetooth_session_->mutable_device_connected_to(); info->set_device_class(device_class); info->set_device_type(DeviceInfo::DEVICE_TYPE_BREDR); info->set_device_type(get_device_type(device_type)); } void BluetoothMetricsLogger::LogA2dpSession(const A2dpSessionMetrics& a2dp_session_metrics) { Loading Loading @@ -851,17 +848,17 @@ void LogBluetoothHalCrashReason(const RawAddress& address, uint32_t error_code, } } void LogLeAudioConnectionSessionReported(int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, std::vector<int64_t>& device_connecting_offset_nanos, std::vector<int64_t>& device_connected_offset_nanos, std::vector<int64_t>& device_connection_duration_nanos, std::vector<int32_t>& device_connection_status, std::vector<int32_t>& device_disconnection_status, std::vector<RawAddress>& device_address, std::vector<int64_t>& streaming_offset_nanos, std::vector<int64_t>& streaming_duration_nanos, std::vector<int32_t>& streaming_context_type) { void LogLeAudioConnectionSessionReported( int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, const std::vector<int64_t>& device_connecting_offset_nanos, const std::vector<int64_t>& device_connected_offset_nanos, const std::vector<int64_t>& device_connection_duration_nanos, const std::vector<int32_t>& device_connection_status, const std::vector<int32_t>& device_disconnection_status, const std::vector<RawAddress>& device_address, const std::vector<int64_t>& streaming_offset_nanos, const std::vector<int64_t>& streaming_duration_nanos, const std::vector<int32_t>& streaming_context_type) { std::vector<int32_t> device_metric_id(device_address.size()); for (uint64_t i = 0; i < device_address.size(); i++) { if (!device_address[i].IsEmpty()) { Loading Loading
system/bta/le_audio/metrics_collector_test.cc +12 −12 Original line number Diff line number Diff line Loading @@ -58,17 +58,17 @@ std::vector<int32_t> last_streaming_context_type; namespace bluetooth { namespace common { void LogLeAudioConnectionSessionReported(int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, std::vector<int64_t>& device_connecting_offset_nanos, std::vector<int64_t>& device_connected_offset_nanos, std::vector<int64_t>& device_connection_duration_nanos, std::vector<int32_t>& device_connection_status, std::vector<int32_t>& device_disconnection_status, std::vector<RawAddress>& device_address, std::vector<int64_t>& streaming_offset_nanos, std::vector<int64_t>& streaming_duration_nanos, std::vector<int32_t>& streaming_context_type) { void LogLeAudioConnectionSessionReported( int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, const std::vector<int64_t>& device_connecting_offset_nanos, const std::vector<int64_t>& device_connected_offset_nanos, const std::vector<int64_t>& device_connection_duration_nanos, const std::vector<int32_t>& device_connection_status, const std::vector<int32_t>& device_disconnection_status, const std::vector<RawAddress>& device_address, const std::vector<int64_t>& streaming_offset_nanos, const std::vector<int64_t>& streaming_duration_nanos, const std::vector<int32_t>& streaming_context_type) { log_count++; last_group_size = group_size; last_group_metric_id = group_metric_id; Loading
system/common/Android.bp +0 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ cc_library_static { "libbt-platform-protos-lite", "libbt_shim_bridge", ], cflags: ["-Wno-unused-parameter"], } cc_test { Loading Loading @@ -118,7 +117,6 @@ cc_test { cfi: false, }, header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], } cc_test { Loading Loading @@ -149,7 +147,6 @@ cc_test { "libosi", ], header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], } cc_benchmark { Loading Loading @@ -177,5 +174,4 @@ cc_benchmark { "libosi", ], header_libs: ["libbluetooth_headers"], cflags: ["-Wno-unused-parameter"], }
system/common/benchmark/thread_performance_benchmark.cc +3 −3 Original line number Diff line number Diff line Loading @@ -48,15 +48,15 @@ void pthread_callback_batch(void* context) { } } void callback_sequential(void* context) { g_counter_promise->set_value(); } void callback_sequential(void* /* context */) { g_counter_promise->set_value(); } void callback_sequential_queue(fixed_queue_t* queue, void* context) { void callback_sequential_queue(fixed_queue_t* queue, void* /* context */) { bluetooth::log::assert_that(queue != nullptr, "assert failed: queue != nullptr"); fixed_queue_dequeue(queue); g_counter_promise->set_value(); } void callback_batch(fixed_queue_t* queue, void* data) { void callback_batch(fixed_queue_t* queue, void* /* data */) { bluetooth::log::assert_that(queue != nullptr, "assert failed: queue != nullptr"); fixed_queue_dequeue(queue); g_counter++; Loading
system/common/message_loop_thread_unittest.cc +2 −2 Original line number Diff line number Diff line Loading @@ -324,10 +324,10 @@ TEST_F(MessageLoopThreadTest, test_post_twice) { int counter = 0; message_loop_thread.StartUp(); message_loop_thread.Post(base::BindOnce( [](MessageLoopThread* thread, int* counter) { ASSERT_EQ((*counter)++, 0); }, [](MessageLoopThread* /* thread */, int* counter) { ASSERT_EQ((*counter)++, 0); }, &message_loop_thread, &counter)); message_loop_thread.Post(base::BindOnce( [](MessageLoopThread* thread, int* counter) { ASSERT_EQ((*counter)++, 1); }, [](MessageLoopThread* /* thread */, int* counter) { ASSERT_EQ((*counter)++, 1); }, &message_loop_thread, &counter)); message_loop_thread.ShutDown(); ASSERT_EQ(counter, 2); Loading
system/common/metrics.cc +18 −21 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ * ******************************************************************************/ #include "metrics.h" #include "common/metrics.h" #include <base/base64.h> #include <bluetooth/log.h> Loading @@ -26,24 +26,21 @@ #include <unistd.h> #include <algorithm> #include <array> #include <cerrno> #include <cstdint> #include <cstring> #include <memory> #include <mutex> #include <mutex> // NOLINT #include <utility> #include "address_obfuscator.h" #include "bluetooth/metrics/bluetooth.pb.h" #include "common/address_obfuscator.h" #include "common/leaky_bonded_queue.h" #include "common/time_util.h" #include "hci/address.h" #include "internal_include/bt_trace.h" #include "leaky_bonded_queue.h" #include "main/shim/metric_id_api.h" #include "metric_id_allocator.h" #include "metrics/metrics_state.h" #include "os/metrics.h" #include "osi/include/osi.h" #include "time_util.h" #include "types/raw_address.h" namespace fmt { Loading Loading @@ -391,7 +388,7 @@ void BluetoothMetricsLogger::LogBluetoothSessionDeviceInfo(uint32_t device_class } DeviceInfo* info = pimpl_->bluetooth_session_->mutable_device_connected_to(); info->set_device_class(device_class); info->set_device_type(DeviceInfo::DEVICE_TYPE_BREDR); info->set_device_type(get_device_type(device_type)); } void BluetoothMetricsLogger::LogA2dpSession(const A2dpSessionMetrics& a2dp_session_metrics) { Loading Loading @@ -851,17 +848,17 @@ void LogBluetoothHalCrashReason(const RawAddress& address, uint32_t error_code, } } void LogLeAudioConnectionSessionReported(int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, std::vector<int64_t>& device_connecting_offset_nanos, std::vector<int64_t>& device_connected_offset_nanos, std::vector<int64_t>& device_connection_duration_nanos, std::vector<int32_t>& device_connection_status, std::vector<int32_t>& device_disconnection_status, std::vector<RawAddress>& device_address, std::vector<int64_t>& streaming_offset_nanos, std::vector<int64_t>& streaming_duration_nanos, std::vector<int32_t>& streaming_context_type) { void LogLeAudioConnectionSessionReported( int32_t group_size, int32_t group_metric_id, int64_t connection_duration_nanos, const std::vector<int64_t>& device_connecting_offset_nanos, const std::vector<int64_t>& device_connected_offset_nanos, const std::vector<int64_t>& device_connection_duration_nanos, const std::vector<int32_t>& device_connection_status, const std::vector<int32_t>& device_disconnection_status, const std::vector<RawAddress>& device_address, const std::vector<int64_t>& streaming_offset_nanos, const std::vector<int64_t>& streaming_duration_nanos, const std::vector<int32_t>& streaming_context_type) { std::vector<int32_t> device_metric_id(device_address.size()); for (uint64_t i = 0; i < device_address.size(); i++) { if (!device_address[i].IsEmpty()) { Loading