Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.clang-format | D | 23-Mar-2024 | 239 | |||
Android.bp | D | 23-Mar-2024 | 2.3 KiB | 97 | 88 | |
AndroidTest.xml | D | 23-Mar-2024 | 1.2 KiB | 26 | 12 | |
OWNERS | D | 23-Mar-2024 | 39 | 3 | 2 | |
README.md | D | 23-Mar-2024 | 1.6 KiB | 50 | 35 | |
boot_event_record_store.cpp | D | 23-Mar-2024 | 4.5 KiB | 151 | 94 | |
boot_event_record_store.h | D | 23-Mar-2024 | 2.6 KiB | 72 | 28 | |
boot_event_record_store_test.cpp | D | 23-Mar-2024 | 6.8 KiB | 226 | 139 | |
boot_reason_test.sh | D | 23-Mar-2024 | 43.1 KiB | 1,415 | 1,226 | |
bootstat-debug.rc | D | 23-Mar-2024 | 322 | 8 | 6 | |
bootstat.cpp | D | 23-Mar-2024 | 60.8 KiB | 1,555 | 1,169 | |
bootstat.rc | D | 23-Mar-2024 | 4.6 KiB | 84 | 77 | |
testrunner.cpp | D | 23-Mar-2024 | 850 | 25 | 7 |
README.md
1# bootstat # 2 3The bootstat command records boot events (e.g., `firmware_loaded`, 4`boot_complete`) and the relative time at which these events occurred. The 5command also aggregates boot event metrics locally and logs the metrics for 6analysis. 7 8 Usage: bootstat [options] 9 options include: 10 -h, --help Show this help 11 -l, --log Log all metrics to logstorage 12 -p, --print Dump the boot event records to the console 13 -r, --record Record the timestamp of a named boot event 14 --record_boot_reason Record the reason why the device booted 15 --record_time_since_factory_reset Record the time since the device was reset 16 17## Relative time ## 18 19The timestamp recorded by bootstat is the uptime of the system, i.e., the 20number of seconds since the system booted. 21 22## Recording boot events ## 23 24To record the relative time of an event during the boot phase, call `bootstat` 25with the `-r` option and the name of the boot event. 26 27 $ bootstat -r boot_complete 28 29The relative time at which the command runs is recorded along with the name of 30the boot event to be persisted. 31 32## Logging boot events ## 33 34To log the persisted boot events, call `bootstat` with the `-l` option. 35 36 $ bootstat -l 37 38bootstat logs all boot events recorded using the `-r` option to the EventLog 39using the Tron histogram. These logs may be uploaded by interested parties 40for aggregation and analysis of boot time across different devices and 41versions. 42 43## Printing boot events ## 44 45To print the set of persisted boot events, call `bootstat` with the `-p` option. 46 47 $ bootstat -p 48 Boot events: 49 ------------ 50 boot_complete 71