Commit graph

19 commits

Author SHA1 Message Date
James Hawkins
13b42bf8a8 bootstat: Handle v1 record files which do not contain file contents.
Bug: 27836969
Change-Id: I18fcdab7ca32d00af3f8827f42d47868492ed719
(cherry picked from commit 84fda19c83)
2016-03-25 10:42:50 -07:00
James Hawkins
e8e8cf3f95 bootstat: Track record inconsistencies w/ a debug metric, bootstat_mtime_matches_content.
Fixed a file descriptor leak while I was in here.

Bug: 27550578
Change-Id: I8e252e4f5bb3c4e2ae96a1560fbb32ae636722a0
(cherry picked from commit 6f28299d0d)
2016-03-23 10:41:03 -07:00
James Hawkins
eef069acc5 bootstat: Disambiguate boot time on encrypted devices.
This change introduces new metrics to discern boot time on encrypted devices:
* post_decrypt_time_elapsed
* boot_decryption_complete
* boot_complete_post_decrypt
* boot_complete_no_encryption

Bug: 27497357
Change-Id: I8d3a411029bd6a45f80589ff67c408593e133a87
(cherry picked from commit c08e996ac8)
2016-03-14 14:27:35 -07:00
James Hawkins
6b930bf060 bootstat: Add more debug logging metrics to RecordFactoryReset.
In an effort to track down the source of some wonky data being reported.

Bug: 27550578
Change-Id: I1f08447c0203e7982d1b44bc04b531e96358c223
(cherry picked from commit 0660b307b8)
2016-03-10 11:49:44 -08:00
James Hawkins
a69e45f93a Merge "bootstat: Gate boot time metrics logging on an encrypted device being decrypted." into nyc-dev 2016-03-07 23:24:17 +00:00
James Hawkins
7763bcb1b8 bootstat: Gate boot time metrics logging on an encrypted device being decrypted.
This prevents double-counting boot metrics for encrypted devices.

Bug: 27454346
Change-Id: If63dd421e4f91a01b43d730d59896544a26d138a
(cherry picked from commit 5e655f02c5)
2016-03-04 17:55:43 -08:00
James Hawkins
e501044c46 bootstat: Don't log time_since_factory_reset on device reset.
The zero value is meaningless and skews the histogram buckets.

Bug: 27477664
Change-Id: Idd641aa3005819905a2ecf664d2a5781dbbff59b
(cherry picked from commit 3bf9b147f2)
2016-03-04 17:53:57 -08:00
James Hawkins
c0188da289 bootstat: Record the time since factory reset on init.
Bug: 25448351
Change-Id: I71905a598e74f41c18a96d469c7a6ddd5a2e07fb
(cherry picked from commit 53684ea625)
2016-02-24 13:19:46 -08:00
James Hawkins
35349148e1 bootstat: Record metrics for factory_reset and time_since_factory_reset.
Bug: 25448351
Change-Id: I9b3a557317bc256a078f76e2b65d16bc071e4a6a
(cherry picked from commit 500d71566a)
2016-02-22 13:30:11 -08:00
James Hawkins
ee79e73373 bootstat: Add a few more bootreasons and rebase the index against index 1.
This is necessary to match the mapping in the internal infrastructure.

Bug: 21724738
Change-Id: I292166ff5c0dea7f3d771627120f16af4c56073b
(cherry picked from commit 6f74c0b843)
2016-02-13 14:02:25 -08:00
James Hawkins
10f54be6d0 bootstat: Add support for logging the boot_reason metric.
This value is read from the ro.boot.bootreason system property.

Bug: 21724738
Change-Id: I43bef3d85ba9c8d87669a91da1aa675d9a86e348
(cherry picked from commit a4a1a4ac85)
2016-02-11 10:37:33 -08:00
James Hawkins
dac84b5a1a Merge "bootstat: Hook up bootstat to record the boot complete signal and log boot events in the LOCAL_INIT_RC file, bootstat.rc." 2016-01-26 21:30:55 +00:00
James Hawkins
6bff639c19 bootstat: Hook up bootstat to record the boot complete signal and log
boot events in the LOCAL_INIT_RC file, bootstat.rc.

This change also creates the /data/misc/bootstat dir during the
filesystem creation block in init.rc.

Bug: 21724738
Change-Id: I2ad6913c0235d5f926c6ef8b3c65d650159c6ed7
2016-01-26 11:23:31 -08:00
Ian Pedowitz
5699ee889a Removing -std=c++14 from bootstat Android.mk
From comments in 7e04be06d1, this
is not needed.

Change-Id: I427efac8d5e0750ea5f4e77e1582d134d9cae089
2016-01-22 20:33:04 -08:00
Rom Lemarchand
7e04be06d1 bootstat: Use Clang and c++14 standard
Change-Id: Ic156eea4d8731e67b26da0a56a7e69b13df659cb
2016-01-22 19:11:20 -08:00
James Hawkins
5cd4bc299b bootstat: Fix the build on git_mnc-dr1.5-dev-plus-aosp by adding missing
C++ includes

Bug: 21724738
Change-Id: I27e1e8d7897302a1f2d1e4d44c226450194f1933
2016-01-22 11:07:51 -08:00
James Hawkins
6d0d12a9d8 bootstat: Followup cleanups from the initial bootstat checkin.
* Clarify the README.md that the logs data may be utilized by anyone.
* Fix a whitespace issue.

Bug: 21724738
Change-Id: Id472485f505afb14588ccd645844a3f4a728abc2
2016-01-20 13:17:02 -08:00
James Hawkins
eabe08b55e bootstat: Fix the base includes to be AOSP-friendly.
Change-Id: I625cc55b41f5258addf3bb74bcef42063c565465
Bug: 21724738
2016-01-20 01:28:48 +00:00
James Hawkins
abd73e6179 system/core: Add initial implementation of the bootstat command.
The bootstat command enables the measurement and logging of boot time
metrics
for GMS devices.

BUG:21724738
Change-Id: I331456dd38a60fb4ef24a4d5320909dbad30db66
2016-01-19 15:10:38 -08:00