Joey Poomarin
5298998e57
MediaMetrics: Implement audio power usage metrics
...
- Trigger audio power usage logging when
1. endAudioIntervalGroup event for track/record
2. setMode to NORMAL for telephony
- Aggregate audio usage by type and device
- Send audiousage data every 24hrs by default, using property
persist.media.audio_power_metrics.interval_hr to config the interval
- Add property persist.media.audio_power_metrics.disable to disable
audio power metrics
Bug: 121318157
Bug: 140909217
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics --all
Change-Id: I94ff00a5609a49c96a14827d3260d481c1310abe
Signed-off-by: Robert Lee <lerobert@google.com>
4 years ago
Andy Hung
ce9b66343a
MediaMetrics: Add device-based actions for Bluetooth
...
Log summary group statistics by device.
Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: I31fef89fa020de175e59784049ef4741914f3a2c
4 years ago
Andy Hung
f7c1410467
MediaMetrics: Add thread-safety checking
...
Test: atest mediametrics_tests
Bug: 70398235
Bug: 149850236
Change-Id: I288ef92e6444785e02043c2629355c229c14e85c
4 years ago
Andy Hung
9099a1a58d
MediaMetrics: Use libmemunreachable for memory testing
...
Full testing steps:
// required for unreachable
$ adb shell setenforce 0
// set up debug malloc
$ adb shell setprop libc.debug.malloc.program mediametrics
$ adb shell setprop libc.debug.malloc.options backtrace=8
// kill media metrics
$ adb shell pkill -f media.metrics
// verify media.metrics has restarted with new pid
$ adb shell pgrep -f media.metrics
// now check media metrics heap (largest 100 items) and unreachable memory.
$ adb shell dumpsys media.metrics --heap
$ adb shell dumpsys media.metrics --unreachable
Test: adb shell dumpsys media.metrics --heap
Test: adb shell dumpsys media.metrics --unreachable
Bug: 149850236
Change-Id: I269003485dd6933c399171fbd9d9a152cee50886
4 years ago
Andy Hung
d7e0dd4524
MediaMetrics: Move LimitProcessMemory to libmediautils
...
Eliminates the need for libmedia in media.metrics, cutting
RSS nearly in half.
Test: adb shell showmap '$(pgrep -f media.metrics)'
Test: adb shell showmap '$(pgrep -f media.extractor)'
Bug: 152256321
Change-Id: Id8aae66de84e712915888422b7372fd2b880570d
4 years ago
Andy Hung
6c22190e49
MediaMetrics: limit maximum memory used
...
Use media utility function limitProcessMemory().
Test: restrict mediametrics memory by property, ensure restart
Bug: 152084875
Change-Id: I20b51cecd67e9ac5e03ab34c1c68b1cfd0b8a964
4 years ago
Marco Nelissen
7c96ea7ff8
Remove mediametrics include symlinks
...
Bug: 143245419
Test: build
Change-Id: I6c836e60c0fe078f5ab7370aec156bdd6e8dcbf0
5 years ago
Andy Hung
a85efab79e
MediaMetrics: Move package name from uid to service utilities
...
Allows sharing class with AudioFlinger.
Bug: 129355845
Bug: 138583596
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics
Change-Id: I6654dc9456dcd7c93821a8d83dd75d96b658f254
5 years ago
Ray Essick
40e8e5eff0
change media analytics references to media metrics
...
part 1: make directory names coherent.
Bug: 145780674
Test: build
Test: atest mediametrics_test
Test: atest CtsNativeMediaMetricsTestCases
Change-Id: If552a742df02206f703801a6530b66fe5addac53
5 years ago