summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorBookatz <bookatz@google.com>2018-12-21 12:16:51 -0800
committerBookatz <bookatz@google.com>2018-12-21 12:38:18 -0800
commit3dbc13a98bd35f91f802f228894d4cbe5cc7e1d6 (patch)
tree51cef87c14d8e9d36fe1a9fb7da203dc96aa3a5f /rs/java/android/renderscript/ProgramStore.java
parentaa63fe5625bc4ac3342a0c1d8d8a010e26ea62be (diff)
Statsd: change power units from double to int64
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
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions