Metrics: Add metrics item for profile usage
Item A: Add messages to log profile connections * Add ProfileUsageStats message in bluetooth.proto * Add BluetoothProfileId enum to represent each profile * Add num_times_connected item to log how many times a profile is connected Item B: Add messages to log headset profile connections for HSP and HFP * Add HeadsetProfileConnectionStats message in bluetooth.proto * Add HeadsetProfileType enum to represent each headset profile type * Add num_times_connected item to log how many times each headset profile is connected * Add unit tests in metrics_tests * Remove "clear" flag in various metrics dumping methods to make sure that we clean up metrics every time we dump Bug: 77476285 Test: make, net_test_osi, BtFunhausMetricsTest, adb shell dumpsys bluetooth_manager --proto-bin Change-Id: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7 Merged-In: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7
Showing
- proto/bluetooth/metrics/bluetooth.proto 55 additions, 0 deletionsproto/bluetooth/metrics/bluetooth.proto
- system/btif/src/bluetooth.cc 1 addition, 2 deletionssystem/btif/src/bluetooth.cc
- system/btif/src/btif_hf.cc 3 additions, 2 deletionssystem/btif/src/btif_hf.cc
- system/osi/include/metrics.h 13 additions, 5 deletionssystem/osi/include/metrics.h
- system/osi/src/metrics.cc 48 additions, 11 deletionssystem/osi/src/metrics.cc
- system/osi/test/metrics_test.cc 102 additions, 13 deletionssystem/osi/test/metrics_test.cc
Loading
Please register or sign in to comment