History log of /system/bt/osi/src/metrics.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0c2c2fa87ba2a57ef48938e488dd662524660c9c 02-Apr-2018 Jack He <siyuanh@google.com> 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
(cherry picked from commit 3277682289843134738a51708b5b4928479c36f6)
/system/bt/osi/src/metrics.cc
b63319bccf3bbb4359ab2da19156d683ba958279 03-Mar-2018 Jack He <siyuanh@google.com> Metrics: Move bluetooth.proto to one place

* Move bluetooth.proto to proto/ and compile it for both Java LITE
runtime and C++ LITE runtime so that it can be shared between Java
and native code
* Remove redundant comments in bluetooth.proto

Bug: 33693818
Test: make, toggle Bluetooth, clearcut server-client E2E test
adb shell dumpsys bluetooth_manager --proto-bin
ACTS tests: BtMetricsTest, BtFunhausMetricsTest
Change-Id: I7cd5e1b4fb8fcc197272ef8161ff384e53022424
(cherry picked from commit 8948b090088330d4ad12cd550986465228d20965)
/system/bt/osi/src/metrics.cc
5b790feeeb211c42bf78ca3ae9c26aa30e516765 18-Sep-2017 Jakub Pawlowski <jpawlowski@google.com> Make copyright headers consistent with Google template; remove "(C)"

Test: Comment changes only; still compiles...
Change-Id: Id699a8170112f06e4a2c9f2e0f0834d1817ace4e
/system/bt/osi/src/metrics.cc
ee5c25732350e156dcf986961f4ed0c366ebc0ae 20-Jan-2017 Jack He <siyuanh@google.com> Corrected default value assignments in Bluetooth A2DP Metrics

* In certain cases btif_a2dp_source_stop_audio_req() could be called before
btif_a2dp_source_start_audio_req() is called, resulting in session_start_us
to be 0. In this case, audio_duration_ms = time_get_os_boottime_us() - 0
will be a very large number that is not the actual audio duration. This
CL marks audio_duration_ms as -1 in the above situation so that we can
differentiate between valid and invalid audio durations
* Set default timer and counter values to 0 when
tx_queue_dequeue_stats.total_updates > 1
* Move update_scheduling_stats for tx_queue_enqueue_stats to
btif_a2dp_source_audio_handle_timer as we intend to capture the time
intervals for enqueue scheduling instead of time intervals between
frame enqueue (i.e. one scheduling event can enqueue multiple frames)
* Use tx_queue_enqueue_stats for metrics instead of *dequeue* since only
enqueue is triggered by timer event

Bug: 33694310
Test: Code compilation, BtFunhausMetricsTest
Change-Id: I10984920afd4d77f07a5ac75736f8dcd69b13af8
(cherry picked from commit 5a9925784a4a34811ae29608b67dee4a580c226b)
/system/bt/osi/src/metrics.cc
a3f831cc746cec746c25c1b45d9528aa3fc926e7 18-Jan-2017 Jack He <siyuanh@google.com> Fix A2DP Metrics Logging Capacity

* Set the maximum number of wake events logged to 1000
* Stop logging wake log name as it takes too much memory
* Add counters for each of the repeated values in BluetoothLog so that
the true number of events can be determined while oldest event get
dropped
* Log Bluetooth session disconnect reasons using enum instead of string
in order to save memory usage
* Apply other branch changes to bluetooth.proto on system/bt

Bug: 33694310
Test: Code compilation and unit tests
Change-Id: I2cc6f9304725938b63b211d615eb1941eac60edf
(cherry picked from commit 7ab4b59672013eddcb706e288962ab7309a75628)
/system/bt/osi/src/metrics.cc
e2eeff4f7f149c59ea8cb67392f287317f40f9bd 08-Dec-2016 Jack He <siyuanh@google.com> Convert build system to soong using Android.bp

* Convert top level Android.mk into build templates in build/Android.bp
and build/fluoride.go
* Initial conversion is done by "androidmk Android.mk > Android.bp"
* Android.bp does not allow source inclusion from external directories
and therefore they have to be made in to cc_library_static in their
respective sub-directories and linked using whole_static_libs in the
modules where they are used
* As Android.bp does not allow multiple modules of the same name,
same-name mudules for different target are merged into one definition
with target specific setup
* Generated proto header path has to be changed in osi/src/metrics.cc as
Android.bp only generate header path relative to the Android.bp file
instead of top-level directory such as system/bt
* Android.bp does not support resource copying yet and hence conf files
are left un-touched.
* Android.bp does support conditional module declaration and therefore
test-vendor libs are left untouched except for unit tests
* The goal of this CL is to direct (almost) translate Android.mk to
Android.bp first with Android.bp specific optimizations coming later

Bug: 32958753
Test: Code compilation, manual testing by test team

Change-Id: I5249e1f2135c4121205619b1d735ce448feb7499
/system/bt/osi/src/metrics.cc
f3175629208a64b190dde4dcf5f92cacef70d3e9 09-Dec-2016 Jack He <siyuanh@google.com> Fix A2DP metrics session duration

* Fixed A2DP duration counting. It is now counting from music play start
to music play end.
* Start logging a2dp connection as Bluetooth sessions. Currently, only
A2DP connections are logged. Thus the bluetooth session length will be
the total connection length and the length within A2DP session message
will be the audio connection length.
* Add a audio_duration_millis field in A2DPSession to record audio duration
* Add bonded memory constraint for metrics entries
* Use a builder mechanism to only build metrics upon dumping
* Refactor metrics module into BluetoothMetricsLogger class
* Created unit test for BluetoothMetricsLogger

Bug: 33694310
Test: Code compilation, Unit test, BtFunhausMetricsTest
Change-Id: Iea2a997c4ea074687a5d50860e9229f0e1b82659
/system/bt/osi/src/metrics.cc
9a24711fd21b2bcab7d3ae67d0f34599f1eae4b1 26-Oct-2016 Colin Cross <ccross@android.com> Replace bluetooth protos with protobuf-lite

Use lite protobufs for bluetooth to remove dependency on
libprotobuf-cpp-full, which will be removed from the platform.

Requires dropping support for
adb shell dumpsys bluetooth_manager --proto-text
which requires full protobufs to call TextToString. The functionality
can be restored without adding a dependency on full protobufs with a
host protobuf decoder.

Bug: 32417805
Test: builds
Change-Id: Ifc9ee23264b1bfff3ad1f85ef4914f788028971a
/system/bt/osi/src/metrics.cc
b55040cc6448a8847490da807d2b6362aa8cb8d9 19-Oct-2016 Myles Watson <mylesgw@google.com> osi: Apply clang-format

cd osi/
clang-format -i --style=file include/*.h include/socket_utils/* src/*.cc \
src/socket_utils/* src/protos/* test/*

Test: mma -j32
Change-Id: I659e586076f1e2ec8f687cd33f441700b8d1f823
/system/bt/osi/src/metrics.cc
b2a292b5d8df2f359c38b0787bc01181225a9bc9 15-Oct-2016 Pavlin Radoslavov <pavlin@google.com> Renamed most C files to C++: *.c to *.cc

Also:
- Fixed C++ related compilation errors.
- Added missing 'extern "C"' guards in some of the header files.
- Added missing LOCAL_CPP_EXTENSION to Android.mk files.
- Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to
btif/Android.mk and bta/Android.mk respectively.
- Fixed the alphabetical ordering of the *.cc files in some
of the Android.mk files.
- Added missing Copyright header to "osi/include/list.h"
- Updated "osi/src/wakelock.cc" to use C++ std::string
instead of dynamic allocation of C-style strings.

Test: code compilation, unit tests, and A2DP streaming
Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
/system/bt/osi/src/metrics.cc
d6121a37c579731b89348e618a823c53b938449a 12-May-2016 Pavlin Radoslavov <pavlin@google.com> Restart failed system calls interrupted with errno of EINTR

In number of places we don't handle properly system calls failures
when the errno is EINTR (i.e., the system call was interrupted
by a signal). In all our use cases, the system calls should be
restarted. The handling of the following system calls (as used in the code)
has been updated/fixed:

poll, send, recv, sendmsg, nanosleep, epoll_wait
read - mostly (e.g., socket-like fds)
write - mostly (e.g., socket-like fds)
select, accept, connect

Bug: 28471477
Bug: 28658141
Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
/system/bt/osi/src/metrics.cc
e6d1202990e0ede65db4470b4eaa20fc4b1f791e 12-May-2016 Jakub Pawlowski <jpawlowski@google.com> Rename all *.cpp files to *.cc to follow new style

Change-Id: Ia79ee09348e67ff4a1712ee11a1e8480180a2623
/system/bt/osi/src/metrics.cc