summaryrefslogtreecommitdiff
path: root/core/java/android/util/StatsLog.java
Commit message (Collapse)AuthorAgeFilesLines
* Move StatsLog.java to fw-statsd.jarTej Singh2020-02-051-273/+0
| | | | | | Test: atest GtsStatsdHostTestCases Bug: 146578693 Change-Id: I7244c6099d16c5c7da14060a1a5fa0c866199754
* Update StatsLogProcessor to handle BinaryPushStateChangedJonathan Nguyen2020-02-041-21/+20
| | | | | | | | Also changed StatsLog to call write() instead of the hard coded function in StatsService. Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases Change-Id: I26171fa4cfc877e1e179b74ec8076d964aff8548
* Don't extend StatsLogInternalMuhammad Qureshi2020-02-041-1/+1
| | | | | | | | Remove StatsLogInternal extension from StatsLog Bug: 145952197 Test: m Change-Id: Icd8e87315178f3b73f3ff8da07d355e29d297e7e
* Use FrameworkStatsLog instead of StatsLogMuhammad Qureshi2020-02-031-3/+6
| | | | | | | | | | | | | As part of statsd becoming a Mainline module in R, autogenerated StatsLog.write() calls are going away and replaced by *StatsLog.java that is autogenerated for each module. This CL replaces some usages of StatsLog with FrameworkStatsLog. Bug: 145952197 Test: m Change-Id: Iaa2db34a7be4c3215f62cc36661ba8ac81656baa
* StatsEvent @SystemApiMuhammad Qureshi2020-01-151-0/+1
| | | | | | | | | Make StatsEvent and StatsLog.write(StatsEvent) @SystemApi. Bug: 146383532 Test: m Change-Id: I15050734e757bdb622fb83e3ef244a6ebd26923b
* Merge "Rename IStatsManager to IStatsd"Jeffrey Huang2019-12-121-9/+9
|\
| * Rename IStatsManager to IStatsdJeffrey Huang2019-12-111-9/+9
| | | | | | | | | | | | Bug: 146075178 Test: CTS/GTS tests Change-Id: I235944758b8cc24a0df85b54d7441e7e8d0a8bbc
* | Merge "Fix StatsEvent memory usage for pulled events"TreeHugger Robot2019-12-101-0/+3
|\ \ | |/ |/|
| * Fix StatsEvent memory usage for pulled eventsMuhammad Qureshi2019-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Log watchdog-initiated rollback reasonGavin Corkery2019-12-091-2/+4
|/ | | | | | | | | | | | | | | To help with monitoring Mainline releases, log the reason for a watchdog-initiated rollback. This may be due to native crashes, app crashes, ANRs or explicit health check failures. Add a mapping from PackageWatchdog failure reason to the new metrics. Bug: 138782888 Test: atest PackageWatchdogTest Test: atest StatsdHostTestCases Change-Id: Ia3e73d955508297004591eac762555665c557b8a
* Add JNI call for writing StatsEvent to statsd.Muhammad Qureshi2019-12-021-2/+25
| | | | | | | | Bug: 143978873 Test: m -j Test: flashes successfully Test: DocumentsUI(a Mainline module) is able to successfully log to statsd Change-Id: I9cdc6151d8feb29a712532e50f143af9d52c8d94
* Statsd: Add watchdog rollback to experiment idsTej Singh2019-05-201-5/+40
| | | | | | | | | Stores experiment ids to disk for watchdog rollback initiate/success events as discussed. Test: gts in topic Bug: 131768455 Change-Id: I32768fe5c5c21c43811e25d8f87faae0c8d82c1f
* Remove StatsLog.writePhilip P. Moltmann2019-04-111-15/+0
| | | | | | | | Usage should be replaced by libs built on StatsLog.writeRaw Fixes: 130246849 Test: Built Change-Id: I37b869a99b7c0428b3aa7bb133f6300c29235c3e
* Migrate NetworkStack metrics off StatsLog.writeChiachang Wang2019-04-111-5/+0
| | | | | | | | | | | | | Now that the new metrics API can be used, NetworkStack metrics need to migrate off the legacy StatsLog.write. Bug: 130323000 Test: Test with ./out/host/linux-x86/bin/statsd_testdrive 121 to ensure log properly Test: Ensure NetworkStackStatsLog will be generated as expected Test: atest NetworkStackTest Change-Id: I8c70503cf1d9f1d06f30a1936d2d88857d0cff53
* More description on logBinaryPushStateChangedHoward Ro2019-04-071-1/+7
| | | | | | | | | | Provides more descriptive documentation for 'options' and 'state' parameters when calling StatsLog#logBinaryPushStateChanged Bug: 129768469 Fix: 129768469 Test: n/a Change-Id: I4b06cc2618258e8e24a26c4616658ce8f146e133
* Public StatsLog API for generic mainline logging.Tej Singh2019-03-201-0/+11
| | | | | | | | | | | | | Sets up a public api for logging atoms to statsd. The API excepts a buffer which is already encoded in the proper format for the socket, as well as the number of bytes of the buffer to write. It performs a JNI call to perform the socket write. Autogenerated app code will be built for each mainline module that needs to use this API to log. Test: builds Test: existing logs flow properly Bug: 126134616 Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
* Merge "Support DATA_STALL_EVENT in StatsLog.write"Chiachang Wang2019-03-071-0/+6
|\
| * Support DATA_STALL_EVENT in StatsLog.writeChiachang Wang2019-02-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The target source to send the event will be mainline module which unable to access @hide classes/functions. And current design of StatsLog.write only allows a specific id. Thus, add more case to support mainline module usage. Bug: 120452078 Test: ./out/host/linux-x86/bin/statsd_testdrive 121 against data stall event sent from NetworkStack Change-Id: I5a68e7e093e63cc87eae753068183215a97e022d
* | add api to log BinaryPushStateChanged atomChenjie Yu2019-02-131-11/+84
|/ | | | | | | | | | | | | | | This api is to log BinaryPushStateChanged. Experiment id is added as a binary blob that is not expected to be accessed on device side. This cl is mainly for API. Will add follow up cls for persisting train info on disk and make puller for it. Will address sepolicy in follow up cls. Bug: 119633962 Bug: 119685453 Test: will add gts Change-Id: I68b4246cf7e8079155e16121ca37a312b35a5328
* Add PermissionGrantRequestResultReported atomPhilip P. Moltmann2019-02-011-0/+15
| | | | | | | | | | Also add a prototype for a future system-api accessible metrics file that will be auto-generated from atoms.proto Test: - ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissoncontroller 170 - triggered permission request Bug: 123594188, 123663448 Change-Id: Icede6ff1f12ca79ebad6267c045a4fb3a9955402
* Re-enable the logging of APP_BREADCRUMB_REPORTED atomyro2018-05-061-20/+62
| | | | | | Bug: 78613419 Test: manual, cts, unit tests Change-Id: I279158c8031eda3ee648053ae6a0d13fde7f1176
* Small fixes to StatsManager API.David Chen2018-03-191-2/+1
| | | | | | | | | Adds some annotations, deletes an unused API method, and adds some comments. Test: Flashed onto marlin-eng and verified there are no crashes. Bug: 72562867 Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
* Fix uid for AppBreadcrumbReported for 3p appChenjie Yu2018-03-151-3/+7
| | | | | | Bug: 74897773 Test: gts test Change-Id: I79ef4efaf37ead570a2fe0d96e2c394a79a20a93
* Revert "Small fixes to StatsManager API."Maurice Lam2018-02-281-1/+2
| | | | | | | | | This reverts commit 16dcd33abdc80b3bd4455ec867a32675f66faa13. Reason for revert: b/73975175 Bug: 73975175 Change-Id: I5bcccde100900b1370c2e43b8bcfc7d1697e5c72
* Small fixes to StatsManager API.David Chen2018-02-221-2/+1
| | | | | | | | | Adds some annotations, deletes an unused API method, and adds some comments. Test: Test that make succeeds. Bug: 72562867 Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
* Updates statsd atoms.proto with small changes.David Chen2018-02-131-3/+4
| | | | | | | | | | | Renames the apphook atom to be more descriptive. Renames time suffixes to match more clear convention (ms and msec are ambiguous). Adds a field to CPU active time that's required for the metrics to be usable. Test: Test that statsd can still build. Change-Id: I94866510738db994e8d757260f30e599ba995dbd
* Adds API for apps to push events to statsd.David Chen2017-12-141-0/+70
| | | | | | | | | | This API allows app to construct custom metrics based on labels chosen by the app developers. Also added some buttons to manually test this functionality in the dogfood app. Test: Verified that Android can be built and tested with custom app. Bug: 69522276 Change-Id: Ifb7abea4c1d62fb435a9cb6f32df12bc2234d82f
* Revert "Revert "Start auto-generating the stats log API.""Yao Chen2017-10-171-76/+0
| | | | | | | | Test: builds successfully This reverts commit 931945399859ab91545ba2c2a914f044092d5e2e. Change-Id: I22bca4a32adf86040b9d72ad5b45999aba28f586
* Revert "Start auto-generating the stats log API."Joe Onorato2017-10-161-0/+76
| | | | | | This reverts commit b81d1a7b9a38dcb4d356ae3435a82fb52ba7d585. Change-Id: I189684d8913ffffca42d9514ac88ea5cc4a44f05
* Start auto-generating the stats log API.Joe Onorato2017-10-151-76/+0
| | | | | | | | | | | | Both native and java bindings. TODOs: - Finish WorkSources. - Clean up the package names for the protos. - Put the protos in a more suitable location. Test: stats-log-api-gen-test Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
* add StatsLog and its jniChenjie Yu2017-08-311-0/+76
Test: ran existing tests. Also confirmed with logcat. Change-Id: I038bbdbd787b1d20e008eda7edf7053875795de2