Check if Perfetto is Complete or Reschedule Check
This change introduces a maximum allowed running time for the perfetto
profiling process based on the requested duration plus additional time
buffers for closing out the processed file and starting the underlying
profiling process.
It also introduces a default recheck delay configuration. This is the
cadence in which the profiling process will be checked after the initial
delay has elapsed. This configuration can be set server side.
The following cases are handled:
1. Under max allowed process time and perfetto process still running
a. Reschedule the check, but in half the time of the original delay.
2. Exceeded max allowed running time and process still running.
a. Kill the perfetto process and process results.
3. Process complete
a. Process results.
Bug: 327660454
Test: atest CtsProfilingModuleTests
Flag: EXEMPT - bug fix
Change-Id: I9bb3243a340d6e3938c8d45c3fa728935f7aaa17
4 files changed