Commit Graph

12 Commits

Author SHA1 Message Date
Muhammad Qureshi
351e40fb8d Increase size limit for pulled StatsEvent.
Increase StatsEvent max byte size to 50 KB when not using pooled buffer.

- Set the default max size to 50 KB
- The starting buffer size is still ~4 KB for pushed and pulled events.
- If a write would exceed the buffer bounds, double buffer size until
write fits or 50 KB limit is exceeded in which case the overflow bit is set to true.
- If usePooledBuffer() is called, max size is set to ~4 KB but buffer
isn't resized. And if the current payload exceeds this limit, set
overflow bit to true.
- Only "recycle" Buffer object if its size is <= ~4 KB.

Bug: 158214941
Test: atest FrameworkStatsdTest
Change-Id: I9b6f73688b0bccb5a70f4ef51750464ec9c87fb9
2020-06-04 14:02:24 -07:00
Tej Singh
058db967d9 Change package of StatsdStatsLog
Change package of StatsdStatsLog from com.android.internal.util to
com.android.internal.statsd

Test: atest GtsStatsdHostTestCases
Bug: 157649935
Change-Id: Iee2af03c950b7cc054f7d77e721694a7f429ae9d
2020-06-01 19:01:43 -07:00
Jeffrey Huang
d8a7f947ba Remove IStatsd reference from StatsLog.java
Also remove sendAppBreadcrumb binder api because it's no longer used.

Bug: 154264326
Test: atest com.google.android.statsd.gts.StatsdHostTestCases
Change-Id: Ic51a057bb01a89a24337521a49c54a52e2073cd1
2020-04-21 15:04:28 -07:00
Muhammad Qureshi
4549e73445 Allow annotations to be added to Atom Id
Add atom-level annotations support in StatsEvent.java

setAtomId must be called right after StatsEvent.newBuilder().
Calling setAtomId out of order results in
ERROR_ATOM_ID_INVALID_POSITION.

Bug: 151158793
Test: atest FrameworkStatsdTest
Change-Id: Ib574f079227660193e12b3aa37136d36e154479a
2020-03-23 20:31:12 -07:00
TreeHugger Robot
650c6a454d Remove libstats_jni from the platform
As part of statsd becoming a mainline module in R,
libstats_jni needs to live in the apex.

Bug: 148620413
Test: m
Test: fastboot flashall

Change-Id: I22c2816c863e7a4462a79ac99238b06aca40a2d6
2020-02-14 14:49:33 -08:00
Muhammad Qureshi
133efaa22f ServiceManager --> StatsFrameworkInitializer
Bug: 149128236
Test: m
Change-Id: I6b506128b4990fa24d745da978608fe3d68a1d8f
2020-02-09 17:14:17 -08:00
Muhammad Qureshi
cefc882d9c FrameworkStatsLog --> StatsdStatsLog
Create a new StatsLog module for statsd apex

Bug: 149128236
Test: m
Change-Id: I48bc2b47c0fbcffd6a8ac646323cafb107358ec9
2020-02-09 17:14:17 -08:00
Muhammad Qureshi
0b04b0560f Remove more Slog usages in statsd apex
Slog.* --> Log.*

Bug: 149128236
Test: m
Change-Id: I926f292dd5562af132774670c35fe2ca4e853bf8
2020-02-09 11:05:47 -08:00
Jonathan Nguyen
703c42f695 Add support for multi train logging
Test: atest GtsStatsdHostTestCases
Change-Id: I4ca7089347d6dfab8a33c07acd5ef9c252413ec9
2020-02-07 16:03:05 -08:00
Tej Singh
e86dab7a6a Move StatsLog.java to fw-statsd.jar
Test: atest GtsStatsdHostTestCases
Bug: 146578693
Change-Id: I7244c6099d16c5c7da14060a1a5fa0c866199754
2020-02-05 15:02:49 -08:00
Muhammad Qureshi
089d1bb28d StatsEvent @SystemApi
Make StatsEvent and StatsLog.write(StatsEvent) @SystemApi.

Bug: 146383532
Test: m

Change-Id: I15050734e757bdb622fb83e3ef244a6ebd26923b
2020-01-15 12:02:01 -08:00
Muhammad Qureshi
237c774468 Create framework-statsd
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
2019-12-16 10:17:03 -08:00