The health HAL specifies a charge cycles path that currently has no
atoms allocated to it. This change will allow statsd to collect this
information. I also ran 'clang-format -i --style=file' on this file.
Bug: 120680509
Test: cts-tradefed run singleCommand cts-dev -m CtsStatsdHostTestCases \
-t android.cts.statsd.atom.HostAtomTests#testBatteryCycleCount
Test: adb shell cmd stats pull-source 10045
Change-Id: I796b275c5d6880e9d7ec5bc468b55d7dc421ac78
Signed-off-by: Maggie White <maggiewhite@google.com>
Bug: 119200347
Test: su 0 ./stats_client -u
Test: Observed USB port overheat event in statsd logs
Change-Id: Ic8801417c54c118e10bb9b631d8e77d68a65c799
Signed-off-by: Maggie White <maggiewhite@google.com>
* Use salted hashed Bluetooth device identifier and deprecate old
ofuscted_id
* Add BluetoothAclConnectionStateChanged and BluetoothScoConnectionStateChanged
to track ACL and SCO connections
Bug: 112969790
Test: Bluetooth unit test, test drive with statsd
Change-Id: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
* Add this atom to report events related to Bluetooth link layer
connection, including:
- Obfuscated ID of remote device
- Connection handle
- Direction of the connection
- Type of the connection
- Associated HCI command and/or event
- Status code associated with HCI command and/or event
- Reason code associated with HCI command and/or event
* Add enum definitions for HCI commands and events as defined in the
Bluetooth 5.0 specification
* Add enum definitions for link type and direction
Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
Hopefully this will never happen, but better to know if it does.
Test: atest SignedConfigHostTest
Bug: 122579497
Change-Id: I4ecdf94f7963728aecf17a448c7bfbc7dbd5f39e
This will allow verification of how well the feature works in prod, as
well as tracking real time usage once Q is released.
Test: atest CtsSignedConfigHostTests
Test: ./out/host/linux-x86/bin/statsd_testdrive 123
Bug: 110509075
Bug: 122350327
Change-Id: Ibada9490e18cbeee74e18aaa93ba9d0d7d03845e
Test: run runtests.sh, make sure no missing test and get all pass
run /out/host/linux-x86/bin/statsd_testdrive 103
Got following metric data dump:pass for local test
Bug: 119862317
Change-Id: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
This CL adds the id of the subscription triggering Perfetto to the
command line invocation of Perfetto. This is useful to allow for
distinguishing between experiments in post-processing (since the same
alert can be attached to multiple subscriptions).
This also fixes a bug in the same place where the last character of ids
could be cut off if any of the ids are large negative numbers i.e. the
smallest possible int64 is 20 chars long (including the minus sign).
However there were only 19 available digits in the string buffers which
these ids were printed into (the 20th would be the null terminator).
Increase the buffer size by 5 characters to allow for some headroom just
incase we need some in the future.
Bug: 122822046
Change-Id: I9c3ac8cb8b203fd464eee2c72b1228f1a50448b1
Adds the RescuePartyResetReported Atom, and uses it in RescueParty.java
to log when a reset is done.
Also adds a small test program that can be built and run manually in
order to test the flow of new log events.
Test: Ran the test program and verified that the events flow through a
local statsd.
Change-Id: I0202dd8c00441d0544aed7de1d6027160b4d9a2b
Bug: 121121998
Test: run runtests.sh, make sure no missing test and get all pass
run /out/host/linux-x86/bin/statsd_testdrive 103
Got following metric data dump:pass for local test
Bug: 119862317
Change-Id: I4e003a0e392e15b71fb3ee3adf7de669ccf25d76
Changes the units for the following atoms from mAh to nAs:
DeviceCalculatedPowerUse
DeviceCalculatedPowerBlameUid
DeviceCalculatedPowerBlameOther
and changes them from floats to int64s.
int64 is better supported in statsd. In particular, Anomaly Detection
currently works only for int64, not floats.
The loss in precision here should be minimal or none. These numbers come
from BatteryStats, which calculates them as follows:
BatteryStats reports time in microseconds (us) as a long.
PowerProfile reports current in mA as a double.
On the power_profile.xml files I have seen, they only have three
decimal places of precision. So uA precision should suffice.
Thus, the absolute smallest unit of charge BatteryStats can therefore
measure (assuming three digits in the PowerProfile) is nAs. Given that our
measurements are over much longer periods of time than a microsecond, we
should be very safe.
In terms of max value: a phone battery is typically around
4000mAh ~ 10^13 nAs << max_int64 by many orders of magnitude.
Bug: 119111972
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.validation.BatteryStatsValidationTests#testPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.validation.BatteryStatsValidationTests#testPowerBlameUid
Change-Id: I1cfd0a05717d7d357b43dd2408c85096599516c7
1) Refactor pullers and add tests.
2) Add timeout to a puller.
mPullTimeoutNs is intrinsic to puller. A pull taking longer than this is
deemed failed and the data discarded.
A metric or StatsPullerManager requesting a pull should monitor the pull
and have deadlineNs. A successful pull may come later than desired due
to statsd processing delays.
3) Add unit tests to puller now that the base puller is more
complicated.
Bug: 118756964
Test: unit test
Change-Id: I0e5d47e2527391f7beef4b2d06bfd5c2f82f1179
Test: run runtests.sh, make sure no missing test and get all pass
run /out/host/linux-x86/bin/statsd_testdrive 103
Got following metric data dump:pass for local test
Bug: 119862317
Change-Id: I691e46ffe4cb30696d35018032d4a7f7628045d9
Part 1 of 2 in migrating statsd to thermal hal v2. Updates the
temperature puller to use thermal hal v2.
Bug: 119228310
Test: adb shell cmd stats pull-source 10021 on blueline. Received 8 cpu
temps, 2 gpu, 1 skin, 1 battery, 1 usb, and 1 npu. Did not receive any
bcl or power amplifier
Change-Id: I8804e282ea928c1815c2a29e72728edf9a053988
Statsd dumpsys wasn't handling multiple configs properly. Also, doing a
dump would delete the data that had been saved to disk. This cl fixes
both those issues.
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testDumpsysStats
Change-Id: I5f2f86c70fbcbc1407aae1b1ffeb7fbdb9f67d0e
Clarify some comments and tweak the names of some fields. Binary
structure of the proto remains intact.
Bug: 119988524
Bug: 120600464
Test: verified that statsd_testdrive still works with this atom
Change-Id: I90d8eb522fc23b2ff604bc1e69e4068dc2c4b73a
Previously, most StatsService calls only allow the caller to specify the
uid if it is Userdebug/EngBuild. This applied even if the caller was
just specifying its own UID; this cl allows such a case. It also allows
ROOT to impersonate SHELL.
Test: Manual testing on userdebug and userbuild devices.
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
Change-Id: I2685d13a8dc24d40b5dab8be9842f53be6888ba3