Sanitizer is picking on the protobuf generated code. Need to figure out why
Disable them to unblock development first.
Bug: 76117312
Test: manual
Change-Id: I3f3a39dfe933f4c1b1cf4063d621392b66f0adea
Statsd clients may want to set an empty config temporarily, so it's
more convenient to allow them to set an empty config instead of
having to use the removeConfig and then having to remember to call
StatsManager#setDataFetchOperation.
Test: Added unit-tests and check they pass on marlin-eng.
Bug: 74997752
Change-Id: I2e762e5ec01e5a2c9a3469fb330b53fefbd734d6
ProtoOutputStream
- Specify the length of message to avoid libprotoutil from thinking that
we are trying to write bool
- We only attach the previous dump file to the upload file where config
key matches
- Store ConfigMetricsReport (instead of ConfigMetricsReportList) onto
disk
- Stop use stack after scope in StorageManager
- Migrate UidMap to use ProtoOutputStream and renaming variables to
prevent confusion
Bug: 74021554
Bug: 75968524
Test: manual test, statsd_test, CTS tests
Change-Id: Iedf52633d7f5b985f5a934a3fb5a0c3c3b2e7fd1
Previously, we wrote a log entry regardless of permission checks, so
the logging could be misleading. Now we only send the log to statsd
after verifying that this setting mutation is valid.
Test: Flashed onto marlin-eng and verified stats-log as expected.
Bug: 73493944
Change-Id: I2a8b052aa8c380ffc5d15caec089fffcdc5823f4
If the bucket size is lower than 1 min, the interval should be at least
1 min.
Bug: 74533948
Test: cts
Change-Id: Icb72579367cd12d3f475c7e2935b98c0ebc66419
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged
Also cleans up batterystats.
Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
The explicit resetStorage function in the subclass isn't needed.
It does exactly what its superclass does.
The previous check for !mAlarms.empty() was actually not needed, since
there can be legit cases where !mAlarms.empty() (namely, when the
mMostRecentBucket is moved forward initially - we may call reset, but we
still want the old alarms to remain).
Test: still pass
Change-Id: I3ffb6e97c02b75170c246f57d55ccf59cd368b9c
Fixes: 74607818
[memory]
statsd binary size from 664k -> 600k
memory usage 1978k -> 1813k (with no configs)
+ Avoid initialize any static map in statslog.h to avoid many copies of the map in each include.
- Do it in cpp so that it is initialized only in places that use them
[Uid annotation]
+ Uid annotation is needed for extracting uid from dimension for UidCpuPuller.
+ After the change, stand-alone uids don't need to be in field 1 anymore.
+ Also added exclusive bit annotation in AppDied
+ Currently only allow one uid field in an Atom. This is to keep things simple until
we find an exception.
Test: statsd_test
Bug: 73958484
Bug: 72129300
Change-Id: I8a916d5c00d5930e24ae7e0825a57dea19c0e744
Every time stopAlarm() is called, it should also,
right then, check to see if the alarm should actually
have already fired (but didn't due to AlarmManager lag).
Right now, the client needs to do this check separately,
but they always go together. Indeed, MaxDurationTracker
forgot to do the check, which is a bug. It would make
much more sense if the stopAlarm takes care of it for
them, to prevent such mistakes.
Bug: 75273733
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert
Change-Id: I689df13690df822090ac34b1171e948be1ad0d9f
Various fixes and improvements to statsd's anomaly detection.
Bug: 74607818
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
Change-Id: Ia67a8eb6da0ea9293f698949e1565f7f024a7cb9
We should fail right away if someone forgets to set this field
instead of setting default values since this may lead to hard to
explain bugs in the future (eg, why isn't systemui logging an atom
to a config).
Bug: 74608359
Test: Verified unit-tests still pass on marlin-eng.
Change-Id: Ibd8a6ccbc5cc8d2dfb8a1577c64bf9b49822a2c3
We don't need to parse the proto of uid map, so we use the
ProtoOutputStreame class to generate the binary form of the proto
output that's needed for parsing the uid map data.
Test: Verified unit-tests still pass.
Bug: 74010813
Change-Id: Ia2f7572f3b78bb6f7b60e8b14cf5d65428469ab6
Add atoms to statsd that are logged by code residing in /vendor.
These atoms are reported from code in /vendor, and
rely on a vendor-provided /system daemon to log the atoms to statslogd.
Test: Built & reported manually.
Bug: 74261180
Bug: 74261750
Bug: 74258154
Bug: 74260998
Change-Id: I858a1266c4c212808fb63276439f1dd6cf2a387e
Past buckets had a field mBucketNum, storing the
"bucket number" they represented. Currently, the concept
of bucket number is used by Anomaly Detection (although this
may not be necessary), but these stored values are not used at all,
so removing them will save RAM.
Test: statsd tests still pass
Bug: 74607818
Change-Id: Iacc343bc39c5035f6e2f236c03de1d91606eff4c
Adds atom defininitions for some bluetooth atoms.
Logging will go in aosp. ag/3668205 contained most of this change, but
is being split up and moved to pi-dev and aosp.
Bug: 74457175, 72320489
Test: build success on marlin
Change-Id: Ib14a74eabfab08bbae5d4d549244f1022e8c34f0
Fix the bug when serializing multiple atoms in gauge metric
BUG: b/74159560
Test: new test for ALL_CONDITION_CHANGES sampling method.
Change-Id: I6d33c1efbac92b6e13be2d64c323e090cb1f84aa