commit | f2855b2aaec65415f3d5366b43fc1d4b38e67042 | [log] [tgz] |
---|---|---|
author | Lakshman Annadorai <lakshmana@google.com> | Tue Mar 03 14:13:10 2020 -0800 |
committer | Lakshman Annadorai <lakshmana@google.com> | Thu Mar 05 16:23:14 2020 -0800 |
tree | 8867e3bfbccb54baab306e8f42b339fee5c63fd7 | |
parent | 325e9652ab02a1c39e1b4039d038ffe7807f0724 [diff] |
Implement collection events and handler looper for the collection thread. - I/O performance data collection runs on a new collection thread and the collection events are handled by the looper handler. - CarWatchdog daemon can interact with the I/O performance collection module via the public methods to start collection, switch collection type, dump collection records, and terminate collection. - Following CL will integrate I/O performance collection module with the CarWatchdog daemon's ServiceManager. - Added Looper wrapper and stub so the tests can deterministically interact with the looper and execute the collection on the collection thread. - Added stubs for UidIoStats, ProcStat, and ProcPidStat collectors so tests can similate the response from these collectors. - Added unit tests to similate different collection events. Below reports were generated from IoPerfCollectionTest#TestValidCollectionSequence test: Sample bugreport dump: https://paste.googleplex.com/5761927382827008 Sample custom collection dump: https://paste.googleplex.com/4592660822097920 Bug: 148486340, 130382110 Test: Tested with unit tests. Change-Id: I517badad732b6d199082c0d126bb5fa22f36ec89
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.