summaryrefslogtreecommitdiff
path: root/core/java/android/util/StatsEvent.java
Commit message (Collapse)AuthorAgeFilesLines
* Create framework-statsdMuhammad Qureshi2019-12-161-829/+0
| | | | | | | | | | | | | | | | | Create framework-statsd jar in statsd apex. Move StatsEvent to framework-statsd.jar. Right now, frameworks jar links against framework-statsd directly. This should be changed to link against framework-statsd-stubs. Bug: 145923096 Bug: 145923116 Bug: 142810493 Test: m Test: flashes successfully Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*" Change-Id: Ife224abd5c9b9b0eeab681dc4b7f71c0bdb856b1
* Fix StatsEvent memory usage for pulled eventsMuhammad Qureshi2019-12-101-8/+58
| | | | | | | | | | | | | | | Add usePooledBuffer flag to the Builder which determines whether to reuse the Buffer's byte array in StatsEvent or use a copy. The build() function also calls release() on the Buffer if a copy of the Buffer's byte array is passed to StatsEvent. Also, for pushed events, release the StatsEvent object and consequently, the Buffer in StatsLog.write(StatsEvent) Fixes: 145026572 Fixes: 144126444 Test: bit FrameworksCoreTests:android.util.StatsEventTest Change-Id: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
* StatsEventParcel impl.; move AIDL filesRuchir Rastogi2019-12-061-36/+1
| | | | | | | | | | | This implementation continue to uses libbinder, as opposed to libbinder_ndk. We also move many (but not all) statsd aidl files from frameworks/base/core into the apex. Test: m -j128 && bit statsd_test:* Change-Id: I95f06e937e50c1e2a638163b13587682402956a7
* Fix error handling in StatsEventMuhammad Qureshi2019-12-051-3/+3
| | | | | | Bug: 143286399 Test: bit FrameworksCoreTests:android.util.StatsEventTest Change-Id: I2159bf138a307e45c44102a8feb7a69d0c793843
* Change visibility of members in StatsEventMuhammad Qureshi2019-11-211-73/+216
| | | | | | | | | | - Rename writeAttributionNode to writeAttributionChain - Make Type Id, size limit constants public and @hide for testing - Change visibility of StatsEvent package protected functions to public Bug: 141696033 Test: m -j Change-Id: Ia4818f621672d469390bf7654bdd317f0cd11692
* Java API for pulled atomsTej Singh2019-11-131-1/+38
| | | | | | | | This creates a java API for registering pullers. Will implement the statsd side in a follow up CL. Test: builds, boots Change-Id: Ib6735984297ce3148839a6370a3c15b2a585baf5
* Make StatsEvent.newBuilder() staticMuhammad Qureshi2019-11-121-1/+1
| | | | | | Bug: 141696033 Test: m -j Change-Id: I660a4384f037327ba475e3badd7cba7fea7f77a5
* Add KeyValuePairs support to StatsEvent.Muhammad Qureshi2019-11-051-11/+86
| | | | | | | | | | - Expose atom id in StatsEvent. - Sync constants with native stats_event. Bug: 143079343 Bug: 143286399 Test: m -j Change-Id: Icaa2d90b40d5da7571444182ead03b54b7b25867
* Add StatsEvent.BuilderMuhammad Qureshi2019-10-211-246/+474
| | | | | | | | | | | | | Use a builder to construct StatsEvent objects. Make StatsEvent immutable. Wrap socket byte array in a Buffer class with write methods for primitives. Implement socket schema at go/statsd-socket-doc StatsEvent.java design doc at go/statsevent-java-doc Bug: 141696033 Test: m -j Change-Id: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
* First draft of StatsEvent.javaMuhammad Qureshi2019-10-071-0/+331
The actual APIs are subject to change once socket encoding is finalized and StatsEvent needs to be marked as @SystemApi. This will be addressed in a future CL. Test: builds successfully Bug: 141696033 Change-Id: I508fa3d2f84850438562d01c78155590819badca