dumpstate: add key timestamps to power dump
This change adds two key timestamps to the power stats section of
dumpstate_board.txt: the time at which the device was booted and the
current time immediately prior to capturing the power stats. It also
refactors the lines of code for dumping power stats into a
self-contained function to improve code maintainability.
Currently, because the process of generating a bugreport takes several
minutes, there is significant uncertainty about the temporal
relationship between the bugreport timestamp and the time at which the
power stats were captured. Also, boot time is reverse-engineered -
again, with an unhelpful degree of uncertainty - by combining the
bugreport timestamp with uptime. Generating these two timestamps
immediately prior to capturing live power stats will allow
identification of the onset times of key subsystem-related power issues
with much more precision than is currently possible.
Bug: 143312304
Test: Built userdebug and user builds, installed and tested by
generating a bugreport and verifying the new content was present.
Change-Id: I49d3234de27205bdfcfae3662500d2d3b77c2e33
1 file changed