Open marandaneto opened 1 year ago
Let's investigate if this is useful for us
HealthStats
provide several classes of data (only for Android N: api 24+): UidHealthStats, PidHealthStats, PackageHealthStats , ProcessHealthStats, and ServiceHealthStats
A snapshot of the current measurements can be retrieved with [SystemHealth.takeMyUidSnapshot()](https://developer.android.com/reference/android/os/health/SystemHealthManager#takeMyUidSnapshot())
We could get the snapshot when a transaction starts and another when the transaction finishes, then compare the results.
There are really a lot of possible values we could get (visit links above for them), like how long the flashlight was used, how many foreground activities are spawn and how long they took, how long the process was in background, how much data was sent or received via bluetooth or wifi, time spent by the process with screen off, how many anrs or crashes there were, time spent in user space or in kernel, etc. Not all of them are always available, but there are definitely interesting things
Investigation is done, need to take results to planning and create issues for implementation.
This has already been planned for Q1 (or maybe Q2), so we just assigned the labels and priority and eventually gonna implement it.
Description
Investigate if
HealthStats
fits the concept of our own measurements set in the transaction. https://developer.android.com/reference/android/os/health/HealthStats If those measurements can be measured within a transaction, maybe we can send them by default as well.